You should never rely on your compiler to do magic things. You should always include the proper include file for the function you are using, in this case <cstdlib>. Just because your compiler includes this file today doesn't mean the next version of the compiler will.