• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 15:35
CET 21:35
KST 05:35
  • 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
RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
Chinese SC2 server to reopen; live all-star event in Hangzhou Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament RSL Offline Finals Info - Dec 13 and 14! StarCraft Evolution League (SC Evo Biweekly) RSL Offline FInals Sea Duckling Open (Global, Bronze-Diamond)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
[ASL20] Ask the mapmakers — Drop your questions BW General Discussion Which season is the best in ASL? Data analysis on 70 million replays BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[Megathread] Daily Proleagues [BSL21] RO16 Group D - Sunday 21:00 CET [BSL21] RO16 Group A - Saturday 21:00 CET [BSL21] RO16 Group B - Sunday 21:00 CET
Strategy
Current Meta Game Theory for Starcraft How to stay on top of macro? PvZ map balance
Other Games
General Games
Path of Exile Nintendo Switch Thread Stormgate/Frost Giant Megathread ZeroSpace Megathread The Perfect Game
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
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Things Aren’t Peaceful in Palestine The Big Programming Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
I decided to write a webnov…
DjKniteX
Physical Exertion During Gam…
TrAiDoS
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1445 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
Hyrule19174 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
Next event in 3h 25m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 592
IndyStarCraft 150
Railgan 103
StarCraft: Brood War
Britney 14526
Calm 2650
Shuttle 567
Larva 230
firebathero 157
Dewaltoss 120
Dota 2
420jenkins383
capcasts69
Counter-Strike
fl0m5816
chrisJcsgo56
kRYSTAL_21
Heroes of the Storm
Liquid`Hasu394
Khaldor153
Other Games
Grubby4333
Beastyqt773
RotterdaM148
Sick135
C9.Mang0130
ArmadaUGS82
Trikslyr56
QueenE51
Mew2King50
ViBE17
Organizations
Other Games
Algost 10
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 20 non-featured ]
StarCraft 2
• StrangeGG 43
• Reevou 11
• Dystopia_ 1
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• Kozan
• IndyKCrew
StarCraft: Brood War
• 80smullet 19
• FirePhoenix12
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV610
• lizZardDota260
League of Legends
• TFBlade898
Other Games
• imaqtpie1513
• Shiphtur217
Upcoming Events
Replay Cast
3h 25m
Korean StarCraft League
1d 6h
CranKy Ducklings
1d 13h
WardiTV 2025
1d 15h
SC Evo League
1d 15h
BSL 21
1d 23h
Sziky vs OyAji
Gypsy vs eOnzErG
OSC
2 days
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
Sparkling Tuna Cup
2 days
WardiTV 2025
2 days
OSC
2 days
[ Show More ]
BSL 21
2 days
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
3 days
Wardi Open
3 days
StarCraft2.fi
3 days
Monday Night Weeklies
3 days
Replay Cast
4 days
WardiTV 2025
4 days
StarCraft2.fi
4 days
PiGosaur Monday
5 days
StarCraft2.fi
5 days
Tenacious Turtle Tussle
6 days
The PondCast
6 days
WardiTV 2025
6 days
StarCraft2.fi
6 days
Liquipedia Results

Completed

Proleague 2025-11-30
RSL Revival: Season 3
Light HT

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
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 © 2025 TLnet. All Rights Reserved.