should this work
Sleep for 7000 + random 7000
its not working for me it the way, am doing this incorrect?
it doesen' t give me an error it just doesn't sleep as long as its supost to
its the same thing as this i think, but I'm trying to put them both into one
that should work
It doesn't give you any errors?!?!
Nothing like this comes up when compiling?
error C2660: 'rand' : function does not take 1 arguments
No, it wouldn't say anything like that if warnings were disabled and <stdlib.h>/<cstdlib> was not included. I'd imagine you'd get something like "warning: implicit declaration of function `rand'", but perhaps not.
Originally Posted by iMalc
So, my suggestion to JordanCason is to #include <stdlib.h> or <cstdlib>, since it seems you haven't already.
Arn't implicit declarations only in C?
Originally Posted by dwks
You're right, though. In C you usually get "implicit declaration of function" warnings, and in C++ you usually get something like "no match for function call" or something. Whatever, there should be a warning of some kind.
Well, Visual Studio throws a fit in that example. If it can't find the function or symbol, it will complain.