• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 23:55
CEST 05:55
KST 12:55
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL21] Ro4 Preview: On Course12Code S Season 1 - RO8 Preview7[ASL21] Ro8 Preview Pt2: Progenitors8Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun13[ASL21] Ro8 Preview Pt1: Inheritors16
Community News
Code S Season 1 (2026) - RO8 Results1Weekly Cups (May 4-10): Clem, MaxPax, herO win1Maestros of The Game 2 announcement and schedule !11Weekly Cups (April 27-May 4): Clem takes triple0RSL Revival: Season 5 - Qualifiers and Main Event12
StarCraft 2
General
Team Liquid Map Contest #22 - The Finalists Code S Season 1 (2026) - RO8 Results MaNa leaves Team Liquid Weekly Cups (May 4-10): Clem, MaxPax, herO win Code S Season 1 - RO8 Preview
Tourneys
2026 GSL Season 2 Qualifiers Maestros of The Game 2 announcement and schedule ! $5,000 WardiTV Spring Championship 2026 SC2 INu's Battles#16 <BO.9> Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players
External Content
Mutation # 525 Wheel of Misfortune The PondCast: SC2 News & Results Mutation # 524 Death and Taxes Mutation # 523 Firewall
Brood War
General
vespene.gg — BW replays in browser Pros React to: TvT Masterclass in FlaSh vs Light ASL21 Strategy, Pimpest Plays Discussions Flashes ASL S21 Ro8 Review BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[ASL21] Semifinals B [ASL21] Semifinals A [BSL22] RO8 Bracket Stage + Another TieBreaker Small VOD Thread 2.0
Strategy
Fighting Spirit mining rates [G] Hydra ZvZ: An Introduction Simple Questions, Simple Answers Muta micro map competition
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Warcraft III: The Frozen Throne Starcraft Tabletop Miniature Game PC Games Sales Thread
Dota 2
The Story of Wings Gaming
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread UK Politics Mega-thread YouTube Thread European Politico-economics QA Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Formula 1 Discussion
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
How EEG Data Can Predict Gam…
TrAiDoS
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1890 users

The Big Programming Thread - Page 248

Forum Index > General Forum
Post a Reply
Prev 1 246 247 248 249 250 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
lungic
Profile Joined January 2012
Sweden123 Posts
February 16 2013 12:19 GMT
#4941
On February 16 2013 19:42 tec27 wrote:
...

Programming skill is the single most important thing for being hired by any software company. Any theoretical stuff you actually need will come up naturally and you can learn it then; no point in wasting your time learning things just because you might need them "some day". Here's my advice to anyone still in school wondering how they should spend their time: Skip all of your classes,

....


I don't necessarily think you are wrong in this statement, but I'm not sure it holds for everyone. "Useless Theoretical knowledge" is tricky to value properly. It depends as always on context. For instance, I spent a semester on learning compilers, context free languages and such. While it didn't help me at the time, a few years later suddenly the pieces fell together. It changed my whole viewpoint at some of our projects at work, how I can solve certain problems. This would never have happened if I'd follow the get rich quick scheme. Why would I ever need to be able to build my own compiler, now I know.

Is this worth two or three years at the University, perhaps not. Does it make me more easily employed, perhaps not. But I know that I wouldn't want to be without the knowledge. It doesn't make me a better person, but it made me a better programmer. So I would rather say, if you're to continue at the University make sure you understand the classes you're taking, rather than just passing the exams. Getting a piece of paper that you cannot back up with understanding is a waste. Try to get some real life experience as well, because the clock ticks at different speeds in academics and in business.
supereddie
Profile Joined March 2011
Netherlands151 Posts
Last Edited: 2013-02-16 12:24:00
February 16 2013 12:23 GMT
#4942
On February 16 2013 20:25 darkness wrote:
Is there any programming code that implements Long Division? This:

http://en.wikipedia.org/wiki/Long_division

Thanks.

Dude. Why should we do your internet searching for you? You know, you also could actually try to learn something and create the algorithm yourself.
"Do not try to make difficult things possible, but make simple things simple." - David Platt on Software Design
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2013-02-16 12:46:38
February 16 2013 12:46 GMT
#4943
On February 16 2013 21:23 supereddie wrote:
Show nested quote +
On February 16 2013 20:25 darkness wrote:
Is there any programming code that implements Long Division? This:

http://en.wikipedia.org/wiki/Long_division

Thanks.

Dude. Why should we do your internet searching for you? You know, you also could actually try to learn something and create the algorithm yourself.


Dude. I tried before asking. Not everyone is brilliant in programming, you know.
supereddie
Profile Joined March 2011
Netherlands151 Posts
February 16 2013 12:51 GMT
#4944
Then you need to be more specific about what you've tried and where you've become stuck, instead of asking generic questions.
"Do not try to make difficult things possible, but make simple things simple." - David Platt on Software Design
peacenl
Profile Blog Joined November 2009
550 Posts
February 16 2013 12:51 GMT
#4945
On February 16 2013 21:46 darkness wrote:
Show nested quote +
On February 16 2013 21:23 supereddie wrote:
On February 16 2013 20:25 darkness wrote:
Is there any programming code that implements Long Division? This:

http://en.wikipedia.org/wiki/Long_division

Thanks.

Dude. Why should we do your internet searching for you? You know, you also could actually try to learn something and create the algorithm yourself.


Dude. I tried before asking. Not everyone is brilliant in programming, you know.

It's not about being knowledgeable or wise enough: it's about trying things yourself and not being lazy if you wish to do something. If you come up with a problem then, people can help, most likely not like this.
- One does not simply walk into a bar and start calling the shots.
- Failure doesn't mean you are a failure it just means you haven't succeeded yet.
Matoo-
Profile Blog Joined June 2007
Canada1397 Posts
Last Edited: 2013-02-16 13:23:26
February 16 2013 13:17 GMT
#4946
All this discussion about CS degrees seems very much to depend on personality, and the balance of theoretical vs. practical you need while learning.

I hated college because learning for the sake of learning just doesn't suit me; I like to build real products. After dropping out from several different colleges and feeling miserable I just went for a quick 1-year degree (not even in CS, was Automation) then got a job and felt much better. But now, a few years down the road, I find myself learning on my own the CS basics that I never studied in college, because I feel that there might be a big potential there to make me a better programmer. I'm currently reading a book about algorithms and data structures and enjoying it much more than I ever would have in college, because I can now see directly how what I learn could help me in my daily job.

If on the other hand you're more like the guy a few posts above who can stomach learning all about compilers, and only finding out a few years later how to actually make use of it (I'm genuinely happy for you :D), then a CS degree seems a great option. Sadly, I haven't had a great track record using this strat, spent two years doing 5hrs math + 3 hrs physics daily and the returns I've got on it in real life so far have been abysmal and I've forgotten most of it by now so future returns are even less likely.
tofucake
Profile Blog Joined October 2009
Hyrule19213 Posts
February 16 2013 13:23 GMT
#4947
On February 16 2013 20:25 darkness wrote:
Is there any programming code that implements Long Division? This:

http://en.wikipedia.org/wiki/Long_division

Thanks.

Yes.
Liquipediaasante sana squash banana
carlfish
Profile Joined June 2011
Australia57 Posts
Last Edited: 2013-02-16 14:06:32
February 16 2013 13:38 GMT
#4948
On February 16 2013 20:25 darkness wrote:
Is there any programming code that implements Long Division? This:

http://en.wikipedia.org/wiki/Long_division

Thanks.


Sure! I had to make it output a string, because that was the only way to make it work with a potentially infinite series but still contain a decimal point.


import Data.Char (intToDigit)

toListOfDigits :: Int -> [Int] -> [Int]
toListOfDigits 0 [] = [0]
toListOfDigits 0 xs = xs
toListOfDigits x xs = toListOfDigits (quot x 10) ((mod x 10) : xs)

longDiv :: Int -> Int -> [Char]
longDiv divisor dividend = dropWhile (=='0') $ longDiv2 divisor (toListOfDigits dividend []) 0

longDiv2 :: Int -> [Int] -> Int -> [Char]
longDiv2 _ [] 0 = []
longDiv2 divisor [] remainder = '.' : fractionalLongDiv2 divisor remainder
longDiv2 divisor (x:xs) remainder = (intToDigit $ quot y divisor) : longDiv2 divisor xs (mod y divisor)
where y = (10 * remainder) + x

fractionalLongDiv2 :: Int -> Int -> [Char]
fractionalLongDiv2 _ 0 = []
fractionalLongDiv2 divisor remainder = (intToDigit $ quot y divisor) : fractionalLongDiv2 divisor (mod y divisor)
where y = 10 * remainder


Note, this code will happily continue to calculate infinite series, but because it is calculating lazily, you can tell it to stop any time you want.


longDiv 3 1 <-- will keep calculating .333333333... etc forever
take 5 $ longDiv 3 1 <--- will return .3333


If you want a specific number of decimal places, you could do this:


decimalPlaces Int -> [Char] -> [Char]
decimalPlaces y str = a ++ (take (y + 1) b) where (a, b) = span (/='.') str


That way,


decimalPlaces 5 $ longDiv 3 8 <--- will return "2.66666"


There's probably a smarter way to do all this, but I'm pretty new to Haskell so that'll have to do for now.

Hope this helps!
I am a fish.
lungic
Profile Joined January 2012
Sweden123 Posts
February 16 2013 14:00 GMT
#4949
@Matoo-
If I were you I would try to worry less about the direct returns of the education you've got so far, and more on the fact that you've made it through that amount of math, which I know I wouldn't. And the knowledge isn't gone, it's just dormant. It'll creep up on you one day, it'll be there lurking and sneaking. Just you wait ...

--

The other thing about University is the other, you know, social aspect.
You can have fun learning with friends, meeting new people, chasing girls, growing up and so on. Rather than spending time arguing with that smug bastard in the cubicle next door who is full of himself, and has a better salary than me. Not to mention the boss who's ...

(Of course it could be the other way around too, avoiding those stupid class mates, and instead hang down the strip club with my ample heaps of money).
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
February 16 2013 14:32 GMT
#4950
On February 16 2013 22:38 carlfish wrote:
Show nested quote +
On February 16 2013 20:25 darkness wrote:
Is there any programming code that implements Long Division? This:

http://en.wikipedia.org/wiki/Long_division

Thanks.

+ Show Spoiler +

Sure! I had to make it output a string, because that was the only way to make it work with a potentially infinite series but still contain a decimal point.


import Data.Char (intToDigit)

toListOfDigits :: Int -> [Int] -> [Int]
toListOfDigits 0 [] = [0]
toListOfDigits 0 xs = xs
toListOfDigits x xs = toListOfDigits (quot x 10) ((mod x 10) : xs)

longDiv :: Int -> Int -> [Char]
longDiv divisor dividend = dropWhile (=='0') $ longDiv2 divisor (toListOfDigits dividend [] 0

longDiv2 :: Int -> [Int] -> Int -> [Char]
longDiv2 _ [] 0 = []
longDiv2 divisor [] remainder = '.' : fractionalLongDiv2 divisor remainder
longDiv2 divisor (x:xs) remainder = (intToDigit $ quot y divisor) : longDiv2 divisor xs (mod y divisor)
where y = (10 * remainder) + x

fractionalLongDiv2 :: Int -> Int -> [Char]
fractionalLongDiv2 _ 0 = []
fractionalLongDiv2 divisor remainder = (intToDigit $ quot y divisor) : fractionalLongDiv2 divisor (mod y divisor)
where y = 10 * remainder


Note, this code will happily continue to calculate infinite series, but because it is calculating lazily, you can tell it to stop any time you want.


longDiv 3 1 <-- will keep calculating .333333333... etc forever
take 5 $ longDiv 3 1 <--- will return .3333


If you want a specific number of decimal places, you could do this:


decimalPlaces Int -> [Char] -> [Char]
decimalPlaces y str = a ++ (take (y + 1) b) where (a, b) = span (/='.') str


That way,


decimalPlaces 5 $ longDiv 3 8 <--- will return "2.66666"


There's probably a smarter way to do all this, but I'm pretty new to Haskell so that'll have to do for now.

Hope this helps!


Thanks. I haven't compiled a Haskell program before, but I've written:

ghc -o test test.hs


I got an error tho:

[1 of 1] Compiling Main ( test.hs, test.o )

test.hs:16:1: parse error (possibly incorrect indentation)

Is there anything that I did wrong or is it just code?
JeanLuc
Profile Joined September 2010
Canada377 Posts
February 16 2013 16:10 GMT
#4951
On February 16 2013 23:32 darkness wrote:
Show nested quote +
On February 16 2013 22:38 carlfish wrote:
On February 16 2013 20:25 darkness wrote:
Is there any programming code that implements Long Division? This:

http://en.wikipedia.org/wiki/Long_division

Thanks.

+ Show Spoiler +

Sure! I had to make it output a string, because that was the only way to make it work with a potentially infinite series but still contain a decimal point.


import Data.Char (intToDigit)

toListOfDigits :: Int -> [Int] -> [Int]
toListOfDigits 0 [] = [0]
toListOfDigits 0 xs = xs
toListOfDigits x xs = toListOfDigits (quot x 10) ((mod x 10) : xs)

longDiv :: Int -> Int -> [Char]
longDiv divisor dividend = dropWhile (=='0') $ longDiv2 divisor (toListOfDigits dividend [] 0

longDiv2 :: Int -> [Int] -> Int -> [Char]
longDiv2 _ [] 0 = []
longDiv2 divisor [] remainder = '.' : fractionalLongDiv2 divisor remainder
longDiv2 divisor (x:xs) remainder = (intToDigit $ quot y divisor) : longDiv2 divisor xs (mod y divisor)
where y = (10 * remainder) + x

fractionalLongDiv2 :: Int -> Int -> [Char]
fractionalLongDiv2 _ 0 = []
fractionalLongDiv2 divisor remainder = (intToDigit $ quot y divisor) : fractionalLongDiv2 divisor (mod y divisor)
where y = 10 * remainder


Note, this code will happily continue to calculate infinite series, but because it is calculating lazily, you can tell it to stop any time you want.


longDiv 3 1 <-- will keep calculating .333333333... etc forever
take 5 $ longDiv 3 1 <--- will return .3333


If you want a specific number of decimal places, you could do this:


decimalPlaces Int -> [Char] -> [Char]
decimalPlaces y str = a ++ (take (y + 1) b) where (a, b) = span (/='.') str


That way,


decimalPlaces 5 $ longDiv 3 8 <--- will return "2.66666"


There's probably a smarter way to do all this, but I'm pretty new to Haskell so that'll have to do for now.

Hope this helps!


Thanks. I haven't compiled a Haskell program before, but I've written:

ghc -o test test.hs


I got an error tho:

[1 of 1] Compiling Main ( test.hs, test.o )

test.hs:16:1: parse error (possibly incorrect indentation)

Is there anything that I did wrong or is it just code?


I'm guessing it could possibly be the indentation on line 16 of test.hs
If you can't find it within yourself to stand up and tell the truth-- you don't deserve to wear that uniform
jxx
Profile Joined April 2010
Brazil307 Posts
February 16 2013 16:21 GMT
#4952
On February 17 2013 01:10 JeanLuc wrote:
Show nested quote +
On February 16 2013 23:32 darkness wrote:
On February 16 2013 22:38 carlfish wrote:
On February 16 2013 20:25 darkness wrote:
Is there any programming code that implements Long Division? This:

http://en.wikipedia.org/wiki/Long_division

Thanks.

+ Show Spoiler +

Sure! I had to make it output a string, because that was the only way to make it work with a potentially infinite series but still contain a decimal point.


import Data.Char (intToDigit)

toListOfDigits :: Int -> [Int] -> [Int]
toListOfDigits 0 [] = [0]
toListOfDigits 0 xs = xs
toListOfDigits x xs = toListOfDigits (quot x 10) ((mod x 10) : xs)

longDiv :: Int -> Int -> [Char]
longDiv divisor dividend = dropWhile (=='0') $ longDiv2 divisor (toListOfDigits dividend [] 0

longDiv2 :: Int -> [Int] -> Int -> [Char]
longDiv2 _ [] 0 = []
longDiv2 divisor [] remainder = '.' : fractionalLongDiv2 divisor remainder
longDiv2 divisor (x:xs) remainder = (intToDigit $ quot y divisor) : longDiv2 divisor xs (mod y divisor)
where y = (10 * remainder) + x

fractionalLongDiv2 :: Int -> Int -> [Char]
fractionalLongDiv2 _ 0 = []
fractionalLongDiv2 divisor remainder = (intToDigit $ quot y divisor) : fractionalLongDiv2 divisor (mod y divisor)
where y = 10 * remainder


Note, this code will happily continue to calculate infinite series, but because it is calculating lazily, you can tell it to stop any time you want.


longDiv 3 1 <-- will keep calculating .333333333... etc forever
take 5 $ longDiv 3 1 <--- will return .3333


If you want a specific number of decimal places, you could do this:


decimalPlaces Int -> [Char] -> [Char]
decimalPlaces y str = a ++ (take (y + 1) b) where (a, b) = span (/='.') str


That way,


decimalPlaces 5 $ longDiv 3 8 <--- will return "2.66666"


There's probably a smarter way to do all this, but I'm pretty new to Haskell so that'll have to do for now.

Hope this helps!


Thanks. I haven't compiled a Haskell program before, but I've written:

ghc -o test test.hs


I got an error tho:

[1 of 1] Compiling Main ( test.hs, test.o )

test.hs:16:1: parse error (possibly incorrect indentation)

Is there anything that I did wrong or is it just code?


I'm guessing it could possibly be the indentation on line 16 of test.hs


Wow that's a pretty wild guess but I'm gonna go ahead with him on this one.
Kambing
Profile Joined May 2010
United States1176 Posts
February 16 2013 16:36 GMT
#4953
On February 16 2013 23:32 darkness wrote:
Show nested quote +
On February 16 2013 22:38 carlfish wrote:
On February 16 2013 20:25 darkness wrote:
Is there any programming code that implements Long Division? This:

http://en.wikipedia.org/wiki/Long_division

Thanks.

+ Show Spoiler +

Sure! I had to make it output a string, because that was the only way to make it work with a potentially infinite series but still contain a decimal point.


import Data.Char (intToDigit)

toListOfDigits :: Int -> [Int] -> [Int]
toListOfDigits 0 [] = [0]
toListOfDigits 0 xs = xs
toListOfDigits x xs = toListOfDigits (quot x 10) ((mod x 10) : xs)

longDiv :: Int -> Int -> [Char]
longDiv divisor dividend = dropWhile (=='0') $ longDiv2 divisor (toListOfDigits dividend [] 0

longDiv2 :: Int -> [Int] -> Int -> [Char]
longDiv2 _ [] 0 = []
longDiv2 divisor [] remainder = '.' : fractionalLongDiv2 divisor remainder
longDiv2 divisor (x:xs) remainder = (intToDigit $ quot y divisor) : longDiv2 divisor xs (mod y divisor)
where y = (10 * remainder) + x

fractionalLongDiv2 :: Int -> Int -> [Char]
fractionalLongDiv2 _ 0 = []
fractionalLongDiv2 divisor remainder = (intToDigit $ quot y divisor) : fractionalLongDiv2 divisor (mod y divisor)
where y = 10 * remainder


Note, this code will happily continue to calculate infinite series, but because it is calculating lazily, you can tell it to stop any time you want.


longDiv 3 1 <-- will keep calculating .333333333... etc forever
take 5 $ longDiv 3 1 <--- will return .3333


If you want a specific number of decimal places, you could do this:


decimalPlaces Int -> [Char] -> [Char]
decimalPlaces y str = a ++ (take (y + 1) b) where (a, b) = span (/='.') str


That way,


decimalPlaces 5 $ longDiv 3 8 <--- will return "2.66666"


There's probably a smarter way to do all this, but I'm pretty new to Haskell so that'll have to do for now.

Hope this helps!


Thanks. I haven't compiled a Haskell program before, but I've written:

ghc -o test test.hs


I got an error tho:

[1 of 1] Compiling Main ( test.hs, test.o )

test.hs:16:1: parse error (possibly incorrect indentation)

Is there anything that I did wrong or is it just code?


The code is fine. Haskell is layout-sensitive. In particular, the where clauses on longDiv2 and fractionaLongDiv2 need to be indented relative to its adjoining definition. If you copy-paste exactly what you have in your text buffer, it'll be easier to diagnose.
BADBADNOTGOOD
Profile Joined October 2012
England57 Posts
February 16 2013 17:54 GMT
#4954
I'm looking to start learning the .NET Framework ( C++ and/or C# ), starting out with building basic console applications. For a while now I've been trawling around the MSDN site looking for ANYTHING about include libraries, DLL Pre-Build commands ect but I can't find any info on using a .NET class in VC++ 2010 / VC# 2010.

I have no idea how to even get these .NET classes recognised by Visual Studios.

It's probably me being stupid but I am clearly missing something, maybe I'm not understanding how development with .NET works?

Any suggestions/ input would be appreciated.



www.leaguereactions.tumblr.com
Kambing
Profile Joined May 2010
United States1176 Posts
February 16 2013 18:10 GMT
#4955
On February 17 2013 02:54 BADBADNOTGOOD wrote:
I'm looking to start learning the .NET Framework ( C++ and/or C# ), starting out with building basic console applications. For a while now I've been trawling around the MSDN site looking for ANYTHING about include libraries, DLL Pre-Build commands ect but I can't find any info on using a .NET class in VC++ 2010 / VC# 2010.

I have no idea how to even get these .NET classes recognised by Visual Studios.

It's probably me being stupid but I am clearly missing something, maybe I'm not understanding how development with .NET works?

Any suggestions/ input would be appreciated.





If you are learning the .NET framework, then you should be restricting yourself to C#. What do you mean by getting VS to recognize your classes? The library-and-build model for C# (to a first-order approximation) is much saner and cleaner than native code (which is sounds like where you are coming from). Can you give a concrete example of what you'd like to do as your initial statement is rather vague.
waxypants
Profile Blog Joined September 2009
United States479 Posts
February 16 2013 18:31 GMT
#4956
On February 17 2013 03:10 Kambing wrote:
Show nested quote +
On February 17 2013 02:54 BADBADNOTGOOD wrote:
I'm looking to start learning the .NET Framework ( C++ and/or C# ), starting out with building basic console applications. For a while now I've been trawling around the MSDN site looking for ANYTHING about include libraries, DLL Pre-Build commands ect but I can't find any info on using a .NET class in VC++ 2010 / VC# 2010.

I have no idea how to even get these .NET classes recognised by Visual Studios.

It's probably me being stupid but I am clearly missing something, maybe I'm not understanding how development with .NET works?

Any suggestions/ input would be appreciated.





If you are learning the .NET framework, then you should be restricting yourself to C#. What do you mean by getting VS to recognize your classes? The library-and-build model for C# (to a first-order approximation) is much saner and cleaner than native code (which is sounds like where you are coming from). Can you give a concrete example of what you'd like to do as your initial statement is rather vague.


I think he just means he can't get his environment setup properly to build.
BADBADNOTGOOD
Profile Joined October 2012
England57 Posts
February 16 2013 18:35 GMT
#4957
On February 17 2013 03:10 Kambing wrote:
Show nested quote +
On February 17 2013 02:54 BADBADNOTGOOD wrote:
I'm looking to start learning the .NET Framework ( C++ and/or C# ), starting out with building basic console applications. For a while now I've been trawling around the MSDN site looking for ANYTHING about include libraries, DLL Pre-Build commands ect but I can't find any info on using a .NET class in VC++ 2010 / VC# 2010.

I have no idea how to even get these .NET classes recognised by Visual Studios.

It's probably me being stupid but I am clearly missing something, maybe I'm not understanding how development with .NET works?

Any suggestions/ input would be appreciated.





If you are learning the .NET framework, then you should be restricting yourself to C#. What do you mean by getting VS to recognize your classes? The library-and-build model for C# (to a first-order approximation) is much saner and cleaner than native code (which is sounds like where you are coming from). Can you give a concrete example of what you'd like to do as your initial statement is rather vague.


Lets say I literally only want access to the System namespace (http://msdn.microsoft.com/en-gb/library/system.aspx)

What headers do I need to use? What libraries do I need to use? How do you set up a VS project to recognise this .NET Framework namespace?

I'm sure I'm just completely overlooking something or missed the page on Getting Started where it mentions this but everyone who talks about using .NET seems to skip mentioning any of this.

Hope that's clearer.
www.leaguereactions.tumblr.com
lungic
Profile Joined January 2012
Sweden123 Posts
Last Edited: 2013-02-16 19:09:00
February 16 2013 18:53 GMT
#4958
Start a new C# project in visual studio from the new project guide. Problem solved, or what on earth are you trying to do?

Edit:
You have included libraries under "references" in the solution explorer. Normally System is included (or mscorlib) if you're using .NET 2.0.
But I'm recommending using 4.0 or later because of the added functionality.

Anyway, you have the same system as in java where you can use "using System.ComponentModel; " in the header, or you can use full namespace in the code, depending on your style.
such as:

using System.Xml; // All namespaces and classes in this file
namespace MyApp
{
using System.ComponentModel; // All classes in this namespace
public class MyClass{
public void Main(){
System.Data.DataTable mytable = new System.Data.DataTable("mytable"); // Only here.
}
}
}

Normally you load them using add reference and allow copy local in the properties dialog for the reference. I.e. dlls will be placed in program dir).


Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2013-02-16 23:30:09
February 16 2013 23:29 GMT
#4959
Could you translate and simplify this one into Java please?

var digit = i < numLength ? parseInt(num[i]) : 0;

My guess is:

int digit;

if (i < numLength)
digit = num[i];
else
digit = 0;


Is this correct?
fabiano
Profile Blog Joined August 2009
Brazil4644 Posts
Last Edited: 2013-02-16 23:33:36
February 16 2013 23:31 GMT
#4960
int digit = (i < numLength) ? num[i] : 0;


Edit: Oh yea, thats correct, but the above also works.
"When the geyser died, a probe came out" - SirJolt
Prev 1 246 247 248 249 250 1032 Next
Please log in or register to reply.
Live Events Refresh
Replay Cast
00:00
Amantes de StarCraft 2 #44
CranKy Ducklings91
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 174
StarCraft: Brood War
GuemChi 5896
Bale 23
Dota 2
NeuroSwarm169
League of Legends
JimRising 720
Super Smash Bros
Mew2King191
Other Games
summit1g9982
C9.Mang0567
WinterStarcraft410
monkeys_forever251
Maynarde148
ViBE122
Organizations
StarCraft: Brood War
lovetv 59
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 13 non-featured ]
StarCraft 2
• CranKy Ducklings SOOP39
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo601
• Stunt120
Upcoming Events
RSL Revival
6h 5m
Classic vs Solar
herO vs SHIN
OSC
9h 5m
Big Brain Bouts
12h 5m
sebesdes vs Iba
Percival vs YoungYakov
Reynor vs GgMaChine
Korean StarCraft League
23h 5m
RSL Revival
1d 6h
Clem vs Rogue
Bunny vs Lambo
IPSL
1d 12h
Dewalt vs nOmaD
Ret vs Cross
BSL
1d 15h
Bonyth vs Doodle
Dewalt vs TerrOr
GSL
2 days
Cure vs herO
SHIN vs Maru
IPSL
2 days
Bonyth vs Napoleon
G5 vs JDConan
BSL
2 days
OyAji vs JDConan
DragOn vs TBD
[ Show More ]
Replay Cast
3 days
Monday Night Weeklies
3 days
Replay Cast
3 days
The PondCast
4 days
GSL
5 days
Replay Cast
5 days
GSL
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-05-13
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
KK 2v2 League Season 1
BSL 22 Non-Korean Championship
Escore Tournament S2: W7
SCTL 2026 Spring
RSL Revival: Season 5
2026 GSL S1
Heroes Pulsing #1
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2

Upcoming

YSL S3
Escore Tournament S2: W8
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
WardiTV Spring 2026
2026 GSL S2
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.