If I decided to learn C++ over C# this is one concern of mine - how much more than C++ do I have to learn? What other things do I have to know?
How does that compare to C#?
Printable View
If I decided to learn C++ over C# this is one concern of mine - how much more than C++ do I have to learn? What other things do I have to know?
How does that compare to C#?
Depends on what you want to do. And on what you consider to be part of C++ or C#.
e.g. you could say that the C++ Standard Library is part of C++ as they are standardized together. In that case you need to learn nothing more than C++ in order to create console apps.
You could say the .Net framework is part of C#. In that case you only need to know C# in order to do nearly everything the language is capable of. But at the same time it gets far harder to learn C# completly.
If you say the .Net framework is not part of C# then you can do jack sh** with only C# - every variable is already an object from the .Net framework. Actually you couldn't write a single valid line of C# code without using the .Net framework (but you don't need to know about that).
With C++ but without the C++ Standard Library you can't do anything either, unless you learn a different library, e.g. the WinAPI. You can write windows apps with the WinAPI alone, you don't need the standard library for that.
But you don't need to know all that much in order to START doing things. You'll learn as you go along. That's the most efficient and most interesting way to learn.
I always considered the standard library and .net to be a part of the languages that I would certainly have to learn. But pt exorcist said that with C++ I would have to know alot of the system works and with C# I am assuming not as much.
What all would I have to know for each?
C# is akin to Java, ie, not tied to the system at all. It uses the .NET framework to communicate with whatever system you happen to be running on (Windows, for now).
C# is synactically similar to C++, with a few subtle differences.
However, C++ is faster. its compile straight down to native code, so, while you couldnt run an executable from windows on, say, a lunix box (without an emulator, or similar), you CAN compile the same code on lunix with few changes, as long as you conform to the standard.
Most C++ compilers include source code for all of the standard libraries, so that you can see exactly how they are implemented. You dont HAVE to learn this, but it is generally something that you pick up along the way. C#, however, is very like VB. It hides away generally ALL system functionality, dumbing the language down. You also cant see how things are implmented, since you dont have the source code for them.
Z.
I am reading the Deitel and Deitel C++ How to Program 2nd ed. right now and it is about 1000 pages. It says that it is only an introduction to C++. How much more is there if I want to make a good program?
How does that compare to C#?
I have a book called Introduction to Algorithms that is nearly 2000 pages. You can learn a language from an introduction book, but only through use can you master a language.Quote:
Originally posted by aewarnick
I am reading the Deitel and Deitel C++ How to Program 2nd ed. right now and it is about 1000 pages. It says that it is only an introduction to C++. How much more is there if I want to make a good program?
How does that compare to C#?
Z.
I learn best through experience anyways.
A good program is good because it hits the need of the user, has an intuitive user interface and no real bugs. You'll be faster writing it when you know C++ better, but you can still write it when you don't know as much C++ (you only read an introductory book). Only you'll take longer to write the program and it might run a little slower.