I have a very simple c++ source like this:
#include <iostream> int main() { srand(time(NULL)); } I am using g++ to compile like this :
g++ ./test.cpp but it successfully compiles despite the fact that time() function is defined in ctime and it is not included with #include
my professor at university runs the code with visual studio (vc++) but he is unable to run the code without including ctime
Am I missing something here ?
by the way my g++ version is :
g++ (Ubuntu 11.2.0-7ubuntu2) 11.2.0