I am new to programming, and I am having trouble understanding the srand(time(0). I am using it to create a program that will generate random times of the day.
I have defined my class time as follows:
// Time.h
// class Time definittion
#ifndef TIME_H
#define TIME_H
class Time
{
public:
Time( int =0, int =0, int=0 );
void setime( int, int, int ) const;
void setHour( int ) const;
int getHour() const;
void setMinute( int ) const;
int getMinute() const;
void setSecond( int ) const;
int getSecond() const;