I wrote a small C++ code and compiled it in MSVS 2013. It compiled fine. However, I tried to compile it on Ubuntu using GCC and it gave an error that I am using std::abs
which is not exist. Then I solved the problem by including cmath
.
Why MSVS did not complain? Does it include some headers by itself. If yes, how can I deny MSVS from including whatever it wants so this kind of non cross-platform code disappears?
Aucun commentaire:
Enregistrer un commentaire