• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 06:33
CET 12:33
KST 20:33
  • 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
Rongyi Cup S3 - Preview & Info3herO wins SC2 All-Star Invitational13SC2 All-Star Invitational: Tournament Preview5RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0
Community News
Weekly Cups (Jan 12-18): herO, MaxPax, Solar win0BSL Season 2025 - Full Overview and Conclusion8Weekly Cups (Jan 5-11): Clem wins big offline, Trigger upsets4$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7)25Weekly Cups (Dec 29-Jan 4): Protoss rolls, 2v2 returns7
StarCraft 2
General
herO wins SC2 All-Star Invitational PhD study /w SC2 - help with a survey! Oliveira Would Have Returned If EWC Continued StarCraft 2 not at the Esports World Cup 2026 [Short Story] The Last GSL
Tourneys
$21,000 Rongyi Cup Season 3 announced (Jan 22-Feb 7) OSC Season 13 World Championship $70 Prize Pool Ladder Legends Academy Weekly Open! SC2 All-Star Invitational: Jan 17-18 Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Simple Questions Simple Answers
Custom Maps
[A] Starcraft Sound Mod
External Content
Mutation # 510 Safety Violation Mutation # 509 Doomsday Report Mutation # 508 Violent Night Mutation # 507 Well Trained
Brood War
General
Which foreign pros are considered the best? [ASL21] Potential Map Candidates Gypsy to Korea BGH Auto Balance -> http://bghmmr.eu/ Fantasy's Q&A video
Tourneys
[Megathread] Daily Proleagues Azhi's Colosseum - Season 2 Small VOD Thread 2.0 [BSL21] Non-Korean Championship - Starts Jan 10
Strategy
Current Meta Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2 Game Theory for Starcraft
Other Games
General Games
Beyond All Reason Nintendo Switch Thread Battle Aces/David Kim RTS Megathread Stormgate/Frost Giant Megathread Awesome Games Done Quick 2026!
Dota 2
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 Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread European Politico-economics QA Mega-thread Canadian Politics Mega-thread NASA and the Private Sector
Fan Clubs
The herO Fan Club! The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
How Esports Advertising Shap…
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
James Bond movies ranking - pa…
Topin
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1735 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
Hyrule19190 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
RongYI Cup
11:00
Playoffs Day 1
herO vs ShoWTimELIVE!
Solar vs Classic
RotterdaM583
ComeBackTV 526
WardiTV274
IndyStarCraft 134
Rex95
BRAT_OK 80
3DClanTV 64
EnkiAlexander 26
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 583
IndyStarCraft 134
Rex 95
SortOf 88
BRAT_OK 80
StarCraft: Brood War
Calm 7769
Rain 3677
Flash 2241
Horang2 1619
Hyuk 1474
Larva 683
BeSt 674
Jaedong 480
Stork 328
Soma 283
[ Show more ]
Mini 277
actioN 264
firebathero 252
Zeus 169
Light 146
Soulkey 142
Snow 99
Pusan 98
ZerO 77
Rush 64
Mong 61
ggaemo 59
PianO 58
yabsab 58
Shuttle 56
Mind 51
ToSsGirL 34
Barracks 34
Sea.KH 31
scan(afreeca) 25
Sharp 23
zelot 22
Free 20
Nal_rA 20
JulyZerg 19
GoRush 19
soO 18
Shinee 18
Icarus 16
910 15
Terrorterran 13
Noble 13
HiyA 13
ajuk12(nOOB) 12
Bale 11
ivOry 5
[sc1f]eonzerg 1
Dota 2
singsing2085
Fuzer 136
XcaliburYe130
NeuroSwarm90
Counter-Strike
kennyS2179
olofmeister1604
zeus581
Super Smash Bros
Mew2King128
Other Games
Sick206
Pyrionflax187
oskar96
ToD83
edward28
ZerO(Twitch)17
Organizations
StarCraft: Brood War
lovetv 7
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• LUISG 37
• Kozan
• AfreecaTV YouTube
• sooper7s
• intothetv
• Migwel
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• iopq 8
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV235
• lizZardDota245
League of Legends
• Lourlo1242
Upcoming Events
Wardi Open
2h 27m
Monday Night Weeklies
5h 27m
OSC
12h 27m
Replay Cast
21h 27m
RongYI Cup
23h 27m
Clem vs TriGGeR
Maru vs Creator
WardiTV Invitational
1d 2h
Replay Cast
1d 21h
RongYI Cup
1d 23h
WardiTV Invitational
2 days
The PondCast
2 days
[ Show More ]
HomeStory Cup
4 days
Korean StarCraft League
4 days
HomeStory Cup
5 days
Replay Cast
5 days
HomeStory Cup
6 days
Replay Cast
6 days
Liquipedia Results

Completed

BSL 21 Non-Korean Championship
OSC Championship Season 13
Underdog Cup #3

Ongoing

CSL 2025 WINTER (S19)
KCM Race Survival 2026 Season 1
Acropolis #4 - TS4
Rongyi Cup S3
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025

Upcoming

Escore Tournament S1: W6
Escore Tournament S1: W7
Acropolis #4
IPSL Spring 2026
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Nations Cup 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 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.