random(), randomize()

the command srand(Time.NULL) takes place of randomize.

oh, and joga, I've always seen it used as time.h not ctime.h maybe changing time.h (if that's what he's using) to ctime will fix it.

i thought <time.h> was for C and <ctime> was for C++?
 
No problem man. I never use random conversions. I had to for my semester final. So I just made a number guessing game which was really boring. If you want to see the code for that I can send you the file.

Oh no thank you. I am actually very good with Programming (100% on the first 5 chapters of C++ programming in my class in 3rd quarter). It's just converting from C++ 6.0 to Visual 2008 Requires outside knowledge.

I appreciate your help, and maybe over the summer I will keep excessively asking questions since I want to finish this book. Really since the built in types of statements are the same for all C++, only ones that calls from libraries i'll have trouble with. But thanks everybody!
 
Dude I love C++. Right now we're on Chapter 11 out of 16 in a year course. The class usually closes at 10 but we move to fast. Specially me. I decided to skip a couple and multitask chapter 11 and 15 as I want to learn something about saving into files. I'm looking for an idea for a project. Has to be decent sized. If you got one hit me up.
 
i thought <time.h> was for C and <ctime> was for C++?

When I took C++, the Standard Template Library was introduced in the middle of our semester. Before that we used stdlib.h for the rand and srand fuctions and time.h for the time. However, once we started using the STL, we had to change to cstdlib and ctime because of compatibility issues with the other files. If we didn't... hundreds of errors.

-civis
 
Back
Top Bottom