This is probably a silly question, but eh...
I made a game, using c++. I'd like to be able to time how long it takes a player to win the game, so he or she can try to beat that time the next time. I assume what i'd have to do is use time( ). I would have a variable startTime at the beginning of the game, and then endTime after the person wins, and then endTime - startTime at the end. However, i'm not sure how the syntax works..
Can I just write
startTime = time( );
or do I need to pass something to time? Thanks :)
I made a game, using c++. I'd like to be able to time how long it takes a player to win the game, so he or she can try to beat that time the next time. I assume what i'd have to do is use time( ). I would have a variable startTime at the beginning of the game, and then endTime after the person wins, and then endTime - startTime at the end. However, i'm not sure how the syntax works..
Can I just write
startTime = time( );
or do I need to pass something to time? Thanks :)
