emk said:
Comparison between C++ and C#. Some says C++ is harder to learn, but it is more flexible and robust than C#. Is there any other thing that I should know?
Yes, lots. But first a disclaimer. I am not a C# programmer, but I have a decent knowledge of Java, have spent a quite a number of years as contract C/C++ programmer, worked as a third level tech support manager, have a degree in CS etc.
1. C++ is not just harder to learn, it is MUCH harder to learn.
2. C# is very much a derivitive of Java. Most things that can be said of Java can be said of C#, with the exception that Java is cross platform and backed by the likes of Sun, IBM, Oracle, BEA etc. Java is also open source.
3. C# and Java are "managed environments". They compile to so called byte code not to native machine language. A virtual machine machine executes the byte code. The JVM has become quite sophisticated, performing on the fly optimization etc, often giving performance that is not far short of C++ code. Because the VM controls execution many programming errors can be trapped and managed. Similar errors in C++ code would cause a crash. Code executing in a VM is generally more secure, and not vulnerable to a lot of the techniques (such as buffer overflow) used to attack code written in C or C++.
4. Following on from point 3, applications written in C# or Java are likely to be more robust than C++ - especially code developed by a novice programmer. Development time is likely to be shorter, and there is likely to be fewer of the really pernicious bugs that can occur in C/C++ code.
5. For nearly all applications, C++ is not more flexible. You will not be constrained by limitations in the C# or Java languages. If one is talking about operating system kernel development, then it's a different story, but for applications C# or Java will nearly always be quite adequate.
To sum up, I really can't see any good reason to begin to learn to program in C++. You will find it initially hard enough, without the complexity of C++. I'd recommend getting a Linux box and using Java (or perhaps even easier
Python). That way you will learn a little about operating systems too, which is not going to happen by clicking buttons in Windows. Both Java and Python are completely free and open source and will run on Linux, Windows, MAC etc.
If you want to start fiddling around there are very good free Java IDEs at
http://www.netbeans.org
http://www.eclipse.org