• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 08:08
CEST 14:08
KST 21:08
  • 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
Serral wins HomeStory Cup 2914Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12
Community News
Balance hotfix patch 5.0.16b (July 16)44Reynor: GSL Loss Wasn't About Preparation Format16[IPSL] Spring 2026 Grand Finals - This Weekend!5Weekly Cups (July 6 - 12): Protoss strike back12BSL Season 22 Full Overview & Conclusion8
StarCraft 2
General
Balance hotfix patch 5.0.16b (July 16) [D] Wireframe Casting Removed Clem: "I don't have that much hope in Blizzard" Reynor: GSL Loss Wasn't About Preparation Format Is the larve respawn broken?
Tourneys
Master Swan Open (Global Bronze-Master 2) WardiTV Summer Cup 2026 GSL CK #5 Race War RSL Revival: Season 6 - Qualifiers and Main Event HomeStory Cup 29
Strategy
[G] Having the right mentality to improve
Custom Maps
New Map Maker - Looking for Advice - Love or Hate Work In Progress Melee Maps [D]RTS in all its shapes and glory <3
External Content
The PondCast: SC2 News & Results Mutation # 534 Burning Evacuation Mutation # 533 Die Together Mutation # 532 Nuclear Family
Brood War
General
ASL22 General Discussion BW General Discussion Pros Debate: Zerg Unfairly Nerfed? (ASL S22 map) Etiquete rules in Asl? Recent recommended BW games
Tourneys
Escore Tournament - Season 3 [Megathread] Daily Proleagues Small VOD Thread 2.0 [IPSL] Spring 2026 Grand Finals - This Weekend!
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Creating a full chart of Zerg builds Relatively freeroll strategies
Other Games
General Games
Path of Exile General RTS Discussion Thread Nintendo Switch Thread Beyond All Reason Stormgate/Frost Giant Megathread
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Power Rank NeO.D_StephenKing vs This Guy From 1 Million Dance TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread The Games Industry And ATVI Russo-Ukrainian War Thread UK Politics Mega-thread YouTube Thread
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Req][Books] Good Fantasy/SciFi books Series you have seen recently...
Sports
2024 - 2026 Football Thread MLB/Baseball 2023 McBoner: A hockey love story Tennis[sport] Formula 1 Discussion
World Cup 2022
Tech Support
Simple Questions Simple Answers FPS when play League Of Legend on laptop How to clean a TTe Thermaltake keyboard?
TL Community
Northern Ireland Global Starcraft The Automated Ban List
Blogs
Poker (part 2)
Nebuchad
The Experiences We Want and …
TrAiDoS
An Exploration of th…
waywardstrategy
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Evil Gacha Games and the…
ffswowsucks
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 7787 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
Hyrule19228 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
WardiTV Invitational
12:00
Summer Cup 2026 - Group A
WardiTV171
LiquipediaDiscussion
CranKy Ducklings
10:00
Master Swan Open #105
CranKy Ducklings63
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Ryung 904
Lowko401
SortOf 153
Rex 111
BRAT_OK 66
MindelVK 28
RushiSC 13
StarCraft: Brood War
Calm 5879
Rain 2516
Shuttle 1711
firebathero 849
Jaedong 679
Horang2 530
Hyuk 463
BeSt 403
Mini 309
Larva 185
[ Show more ]
Stork 176
Rush 153
Last 151
ZerO 146
Hyun 125
hero 89
Killer 75
ggaemo 71
Pusan 70
Sharp 65
Mong 62
Free 45
JYJ 40
Aegong 35
ZergMaN 34
soO 32
JulyZerg 32
sorry 29
Shine 27
Movie 21
Barracks 17
HiyA 17
yabsab 16
Hm[arnc] 15
ajuk12(nOOB) 12
Noble 9
IntoTheRainbow 9
Dota 2
Gorgc4533
XcaliburYe263
League of Legends
Doublelift2194
Counter-Strike
byalli1367
Heroes of the Storm
Trikslyr23
Other Games
gofns14835
singsing1674
B2W.Neo861
RotterdaM225
Happy192
XaKoH 129
ZerO(Twitch)7
Organizations
Other Games
gamesdonequick2511
BasetradeTV154
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 16 non-featured ]
StarCraft 2
• epiclan15
• Adnapsc2 13
• CranKy Ducklings SOOP7
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Pr0nogo 2
• FT.aCt)Sony1
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos2205
Upcoming Events
Epic.LAN
53m
IPSL
3h 53m
Dragon vs Hawk
RSL Revival
20h 53m
Classic vs Trap
herO vs SHIN
Sparkling Tuna Cup
21h 53m
OSC
1d
IPSL
1d 3h
Bonyth vs Ret
WardiTV Weekly
1d 22h
Monday Night Weeklies
2 days
PiGosaur Cup
3 days
The PondCast
3 days
[ Show More ]
Replay Cast
4 days
CrankTV Team League
4 days
Replay Cast
5 days
CrankTV Team League
5 days
Korean StarCraft League
6 days
RSL Revival
6 days
Liquipedia Results

Completed

Escore Tournament S3: W3
HSC XXIX
Eternal Conflict S2 E2

Ongoing

IPSL Spring 2026
Acropolis #4
YSL S3
CSL 2026 Summer (S21)
KCM Race Survival 2026 Season 3
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026

Upcoming

Escore Tournament S3: W4
ASL S22 SEASON OPEN Day 2
Escore Tournament S3: W5
CSLAN 4
Blizzard Classic Cup 2026
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
Light Tournament 2026
Eternal Conflict S2 Finale
Eternal Conflict S2 E3
Logitech G Connect 2026
StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
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.