3 ms·
Novice question: Why is C++ used for the vast majority of video games today? Why is it used for most commercial CFD codes? (A lot of codes in academia still use
by starpilot 15y ago
Novice question: Why is C++ used for the vast majority of video games today? Why is it used for most commercial CFD codes? (A lot of codes in academia still use tons of legacy fortran though.)
- sehugg 15y agoI think this post sums it up pretty nicely: http://www.gamearchitect.net/Articles/WhyC++.html http://www.gamearchitect.net/Articles/WhyC++.html Personally I think the advantages boil down to syntax and type-safety. For example, vector math is much more succinct and can be made type-safe. Constructors/destructors also can be handy for enforcing resource allocation.
- malkia 15y agoyes, but you are not allowed to use exceptions, and the latter being major feature of the language puts one in strange situation.