Hi, I have been making a maze based game over the past few weeks and i wanted to implement a timer into the game level, so the player can keep track of how long it took them to complete the game. I have managed to write some code for the timer, but i am unable to build and compile it and it does not output the time when i put it into my maze game code.
Here is the code:
#include <iostream.h>
#include <time.h>
class timer {
private:
unsigned long begTime;
public:
void start() {
begTime = clock();
}