Interesting elaboration, Winged. So is this topic going wider? Perhaps we could ask: should he learn assembler before C before C++ before C#?
Thread: C necessary before C++? |
Here's an example of how C++ can help you in ways C can't:
It uses the GNU Multi-Precision library, which provides a class for arbitrarily large "integers". As a result, it is object oriented. The class is a wrapper for a collection of C functions, so you can use this library with C as well. However, just looking at the code, it appears to be a simple procedural program with a funny data type. This is the power of C++. You can create classes that simply get out of your way and let you work without thinking too much about them. The C version of this program, using the same library, is much more complicated and imposes more responsibility on the user.Code:#include <gmpxx.h> #include <iostream> using std::cout; using std::cin; int main() { int num; cout<<"Pick the number you want to raise to a factorial: "; cin<<num; mpz_class fact=1; for(int j=1;j<=num;j++) fact*=j; cout<<num<<"! = "<<fact<<"\n"; return 0; }
CodeCall Blog | CodeCall Wiki
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog
Interesting elaboration, Winged. So is this topic going wider? Perhaps we could ask: should he learn assembler before C before C++ before C#?
proudly presenting my personal website and game website: F1Simulation. a thrilling Managed DirectX racing game... also my Ask Me
look at my tutorials about cropping images and Mono: bundling Mono with programs and lambda expressions
I'd say that C# is more of an aside to the C/C++ debate. C# borrows more from Java than from C++, though Java of course takes a lot of ideas from C++.
CodeCall Blog | CodeCall Wiki
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog
In our univercity C++ is studied at the first semester but education program don't give sufficient attention for C, so some students don't understand differents between this languagesI think it's wrong
definitely not. They are two different things. People are often made into believing that learning c helps before c++. I would say, do not waste your time, go for c++ straight and then come back to C just to learn the diferences in usage, there are only a few. read here :: Differences between c and c++ | TECHARRAZ
God is real... unless declared an integermy blog :: http://techarraz.com/
No C is not necessary before C++. They are two different languages, you dont need to know C before learning C++
There are currently 1 users browsing this thread. (0 members and 1 guests)