+ 19

How different is C from C++, and do you think it is possible to learn both, at the same time?

Currently studying C in College, buh I don't know if I can learn C++ alongside without probs

30th Apr 2017, 10:25 AM
Ghaffaru Mudashiru
Ghaffaru Mudashiru - avatar
7 Answers
+ 18
C++ has different headers (but C headers are also compatible), different syntaxes (e.g. main() must return int), and more features/concepts (C++ is OOP lang which deals with objects and classes). Learning both together should be fine as long as you don't do C++ exclusive stuff in C. :>
30th Apr 2017, 10:34 AM
Hatsy Rei
Hatsy Rei - avatar
+ 15
Thanks for all ya answers pals
5th May 2017, 8:56 AM
Ghaffaru Mudashiru
Ghaffaru Mudashiru - avatar
+ 7
Yes but becareful as something has to be confusing although it is very possible
30th Apr 2017, 10:34 AM
Complex
Complex - avatar
+ 5
as i wrote in another discussion, c can be considered as a subset of c++. thus if you really know c++, you already learned c. but: if you need to operate on some restricted hardware you have to use the available c there (embedded systems, arm architecture). on these systems there might be no c++ available. c++ is more like a combination of multiple programming languages or paradigms as already stated by scott Meyers in effective c++ programming. c is only one part, for sure the most fundamental. but beside c you need to observe: - object orientation (c does not know classes)/polymorphism - templates (c only knows the c preprocessor) - stl standard template library - new extensions in c++11/14/17 like lamdas
30th Apr 2017, 12:03 PM
Volker Milbrandt
Volker Milbrandt - avatar
+ 4
C++ can do everything that C has ever done. the major difference is that C++ supports OOP and C does not. You can even use the same header files and compilers to compiler either of them.
1st May 2017, 12:04 AM
Krishneel Nair
Krishneel Nair - avatar
+ 3
when you know C++don't claim to know C cause they're not the same but aren't that different
30th Apr 2017, 11:02 AM
Mito Khoza
Mito Khoza - avatar
+ 2
C and C++ are very similar.
30th Apr 2017, 10:30 AM
CalviŐ˛
CalviŐ˛ - avatar