I include ctime in my file. However, when I compile it via command line, it says that srand() and rand() aren't declared within the scope of the function I put them in. The weird thing is, my IDE compiles it perfectly, and it does so using g++. Can anybody help me out?