Which version of C++ is Cocos2d-x game engine written in?

Which version of C++ is Cocos2d-x game engine written in?
0.0 0


Hello, I will barely be diving deep into learning C++ and I was just curious to know which version of C++ the latest Cocos2d-x Game engine written in, is it C++ 11? I am debating on which version of C++ to start learning and would rather use the one that Cocos2d-x uses so the learning process can be smoother for me. Thanks very much!


yes, c++ 11, as of version 3.0+.


Are there any plans to switch to C++14 or are there any problems with it?


No plans to update the engine to use c++ 14 specifically at this time.

That being said, I use c++ 14 specific features and no problems.


How are you able to use c++ 14 features , if the engine is written in c++11? Sorry just a bit new and would like to understand more


Why would you not be able to mix? just change your version to c++14 and that means that c++11 and 14 and technically 03, 98, etc will work.

Edit: to provide more detail. The entire engine is not c++11. Just what made sense to update to c++11. When you write code, most often times older versions of the spec are still valid. For example. c++17 is now out and compilers are adding support for it. This means that if I set my compiler to use c++17 that 17, 14, 11, 03, 98, etc will all still work. I can mix code as I wish. There could be deprecated code, yes, but in my experience it isn’t so likely. I still have an app from 2000-2001 that uses c++ 98, some c++11 and I started adding some c++14 where it made sense. . I can still compile it to this day in VS 2017.


Ok , thanks for the detailed explanation I understand way better now! It makes a lot more sense, so it’s like backward compatible then from which ever version of C++ you set your compiler to use, I did not know this before once again thanks for taking time to explain to me !