+ 3
Is C++ exactly the same syntax & keywords as C, with addition of OOP features? Or are there differences in syntax & keywords?
C++ how similar to C?
5 Antworten
+ 7
not exactly the same. but very much like as far as I am aware. most c code is valid c++ code. but newbie here sooooo. grain of salt?
+ 5
despite C++ being derived from C, they both differ
@Jay, most C++ compilers support C so you can use C syntax within the C++ program. it all depends on the various header files that you use.
+ 4
They work in a similar way.
for C printf("hello world");
for C++ cout<<"hello world";
The keywords may be different, but C++ is defived from C.
+ 4
@krishneel; thought so. thanks mate
+ 2
quick comparison
https://drive.google.com/file/d/0B66ub-Li9jOQQnRqb1h5ZDFCRUU/view?usp=drivesdk
I would like to add
they can both be used at the same time