- 1
C doesn't have data types while c++ was developed to overcome this how does this make c++ better ?
1 Answer
+ 4
C does have data types. What it doesn't have is classes. Classes do not make a language better. It makes it easier to code working programs. However, any C++ program you write, I can make in C and mine will run faster & use less memory.
The really difference is how long it would take to code the program. I would be able to code it faster using C++ over my C coding time. This is the number one reason C++ has displaced C.
Also, the fact that C doesn't support OOP and classes doesn't prevent the smart programmer from writing OOP code in C. This was being done prior to C++ appearing on the scene. In fact, it was a driving force in the adding class support and making C++.