Well that may sound like a troll question, but since C++ seems hard to fully master (and I never really knew STL was actually "part" of it), I wanted to know what are the disadvantages to use C instead of C++ when not relying much on OOP.
C++ can have a very much sophisticated syntax sometimes, which is kinda confusing me while trying to use OGRE3D for example...
Other Reasons To Use C This makes the coding structure much more organized and easier to follow. Compared to C++, C is the simpler and ultimately faster programming language. C is procedural and does not support classes and objects, meaning it has less functionality than C++.
It is fast The programs that you write in C compile and execute much faster than those written in other languages. This is because it does not have garbage collection and other such additional processing overheads. Hence, the language is faster as compared to most other programming languages.
C++ is a more object-oriented high-level programming language which requires fixed construction and principles. However, it is easier to code. C programming language does not adhere to the encapsulation concept and allows easy data manipulation from outside code. C++ is a more secure programming language.
The biggest practical reason for preferring C is that support is more widespread than C++. There are many platforms, particularly embedded ones, that do not even have C++ compilers. There is also the matter of compatibility for vendors.
Non-OO features that C++ has that C does not:
struct
s and enum
s without writing struct
or enum
before every declaration or using typedefs.for
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With