• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 07:56
CET 12:56
KST 20:56
  • 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] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy5ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289
Community News
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool39Weekly Cups (March 9-15): herO, Clem, ByuN win42026 KungFu Cup Announcement6BGE Stara Zagora 2026 cancelled12Blizzard Classic Cup - Tastosis announced as captains18
StarCraft 2
General
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Potential Updates Coming to the SC2 CN Server Weekly Cups (March 2-8): ByuN overcomes PvT block Weekly Cups (August 25-31): Clem's Last Straw? Weekly Cups (March 9-15): herO, Clem, ByuN win
Tourneys
World University TeamLeague (500$+) | Signups Open RSL Season 4 announced for March-April Sparkling Tuna Cup - Weekly Open Tournament WardiTV Team League Season 10 KSL Week 87
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026]
External Content
Mutation # 518 Radiation Zone The PondCast: SC2 News & Results Mutation # 517 Distant Threat Mutation # 516 Specter of Death
Brood War
General
Soulkey's decision to leave C9 JaeDong's form before ASL BGH Auto Balance -> http://bghmmr.eu/ [ASL21] Ro24 Preview Pt1: New Chaos ASL21 General Discussion
Tourneys
[ASL21] Ro24 Group A [Megathread] Daily Proleagues ASL Season 21 LIVESTREAM with English Commentary [BSL22] Open Qualifiers & Ladder Tours
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2
Other Games
General Games
General RTS Discussion Thread Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
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
TL Mafia Community Thread Five o'clock TL Mafia Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine YouTube Thread Canadian Politics Mega-thread Russo-Ukrainian War Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books Movie Discussion! [Manga] One Piece
Sports
2024 - 2026 Football Thread Cricket [SPORT] Formula 1 Discussion Tokyo Olympics 2021 Thread General nutrition recommendations
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
U4GM Tips Counter Enemy Gadgets Fast in Black Ops rsvsr How to Keep Reward Chains Rolling in Monopol u4gm What to Do First in MLB The Show 26 Spring
Blogs
Funny Nicknames
LUCKY_NOOB
Money Laundering In Video Ga…
TrAiDoS
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 6136 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
Hyrule19196 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
Afreeca Starleague
10:00
Ro24 Group A
Sharp vs Scan
Rain vs Mong
Afreeca ASL 10718
StarCastTV_EN237
LiquipediaDiscussion
Replay Cast
09:00
WardiTV Mondays #75
CranKy Ducklings152
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko212
ProTech124
Harstem 54
Rex 51
MindelVK 14
OGKoka 0
StarCraft: Brood War
Calm 18262
Flash 6006
Bisu 4777
Horang2 2570
Jaedong 1511
BeSt 829
Hyuk 743
Stork 336
Pusan 310
Zeus 268
[ Show more ]
Light 259
Larva 183
Leta 162
PianO 87
Killer 68
ToSsGirL 65
Rush 55
Backho 51
NotJumperer 51
Snow 48
Nal_rA 32
Shinee 30
Bale 27
Icarus 21
Hm[arnc] 21
yabsab 20
Terrorterran 17
GoRush 16
soO 14
Noble 13
Movie 10
ajuk12(nOOB) 8
Dota 2
Gorgc2636
Counter-Strike
olofmeister1613
fl0m1503
zeus388
edward82
byalli25
Super Smash Bros
Westballz8
Other Games
singsing706
XBOCT611
B2W.Neo568
shoxiejesuss269
crisheroes213
Sick136
Mew2King53
hiko43
ArmadaUGS6
Organizations
StarCraft: Brood War
UltimateBattle 259
Dota 2
PGL Dota 2 - Main Stream60
StarCraft: Brood War
lovetv 21
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• StrangeGG 26
• CranKy Ducklings SOOP2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 3
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Upcoming Events
Wardi Open
4m
Rex51
WardiTV50
OGKoka 0
Monday Night Weeklies
5h 4m
Sparkling Tuna Cup
22h 4m
Afreeca Starleague
22h 4m
Soulkey vs Ample
JyJ vs sSak
Replay Cast
1d 21h
Afreeca Starleague
1d 22h
hero vs YSC
Larva vs Shine
Kung Fu Cup
1d 23h
Replay Cast
2 days
KCM Race Survival
2 days
The PondCast
2 days
[ Show More ]
WardiTV Team League
3 days
Replay Cast
3 days
WardiTV Team League
4 days
RSL Revival
4 days
Cure vs Zoun
herO vs Rogue
WardiTV Team League
5 days
Platinum Heroes Events
5 days
BSL
5 days
RSL Revival
5 days
ByuN vs Maru
MaxPax vs TriGGeR
WardiTV Team League
6 days
BSL
6 days
Replay Cast
6 days
Afreeca Starleague
6 days
Light vs Calm
Royal vs Mind
Wardi Open
6 days
Liquipedia Results

Completed

Proleague 2026-03-22
WardiTV Winter 2026
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
BSL Season 22
CSL Elite League 2026
CSL Season 20: Qualifier 1
ASL Season 21
Acropolis #4 - TS6
RSL Revival: Season 4
Nations Cup 2026
NationLESS Cup
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual

Upcoming

2026 Changsha Offline CUP
CSL Season 20: Qualifier 2
CSL 2026 SPRING (S20)
Acropolis #4
IPSL Spring 2026
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
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.