Twelve Years of Service
Posts: 51
Threads: 16
Should I learn C before learning C++? 07-14-2016, 02:19 AM
#1
I am interested in learning C++. Would I be better off learning C before starting to learn C++?
sup
•
Ten Years of Service
Posts: 1,897
Threads: 94
RE: Should I learn C before learning C++? 07-27-2016, 07:23 PM
#4
learn C++ and say thank god
Die But Don't Lie
“Oh Abu Dharr! Don’t look at the smallness of the sin but look at the one you disobeyed.” Prophet Muhammad (pbuh)
![[Image: p_237m2jx1.png]](http://c.top4top.net/p_237m2jx1.png)
Click for Free VPN
•
Twelve Years of Service
Posts: 271
Threads: 17
RE: Should I learn C before learning C++? 07-31-2016, 11:15 PM
#5
Learning C is not a requirement at all for learning C++ and if you are advanced enough in C, you'll know that you can't just take all C code and have it behave in the same way as C++. However, if you know the nuances of C++ and the differences between the languages, C will give you a better understanding on how the C++ STL works among other things. Knowledge of C unless you enjoy learning about what makes things work will help you to write optimized C++ code too. There are a lot of things that make C++ difficult however, and with every standard of the language this is even more so true. A beginner trying to learn C++14 for instance will have a very hard time trying to grasp concepts like smart pointers (RAII), perfect forwarding, L/R-value references (and others), move semantics, type deduction with auto and decltype combined; all features that have progressed from early C++, to C++11, to C++14, among many other functions that were introduced for such things. In C, you deal with a much smaller standard library, pointers, and a lot of arithmetic. In C++, you deal with encapsulations of certain functionality that does most of the heavy lifting for you through many abstractions, and trying to figure out why some code doesn't work depending on how complex and layered those abstractions are can be tricky at times because you might end up with a bible of compiler errors that you'll have to look through in attempt to understand what line gives you the best idea of what the problem is.
•