5,321
edits
No edit summary |
|||
Line 284: | Line 284: | ||
[https://gist.github.com/bkaradzic/2e39896bc7d8c34e042b Reference]<br> | [https://gist.github.com/bkaradzic/2e39896bc7d8c34e042b Reference]<br> | ||
Somewhat opposite of modern C++.<br> | Somewhat opposite of modern C++.<br> | ||
Basically only use C++ for its classes. Do everything else C-style. | Also known as "C with Classes"<br> | ||
Basically only use C++ for its classes. Do everything else C-style.<br> | |||
The main benefit is compatibility with older compilers/libraries and easier understanding for people less familiar with newer C++ features. | The main benefit is compatibility with older compilers/libraries and easier understanding for people less familiar with newer C++ features. | ||
*Don't use C++ runtime wrapper for C runtime includes (<cstdio>, <cmath>, etc.), use C runtime instead (<stdio.h>, <math.h>, etc.) | * Don't use C++ runtime wrapper for C runtime includes (<cstdio>, <cmath>, etc.), use C runtime instead (<stdio.h>, <math.h>, etc.) | ||
*Don't use stream (<iostream>, <stringstream>, etc.), use printf style functions instead. | * Don't use stream (<iostream>, <stringstream>, etc.), use printf style functions instead. | ||
*Don't use anything from STL that allocates memory, unless you don't care about memory management. | * Don't use anything from STL that allocates memory, unless you don't care about memory management. | ||
* Don't use exceptions. | |||
* Don't use RTTI. | |||
==Useful Libraries== | ==Useful Libraries== |