View Single Post
  #2 (permalink)  
Old September 8th, 2018, 02:24 AM
aditya12 aditya12 is offline
Registered User
 
Join Date: Sep 2018
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Separate header and implementation file

I use simple example of my site http://www.welookups.com
Separate header and implementation file

#ifndef TIME_H
#define TIME_H

class Time
{
private :
int hour;
int minute;
int second;
public :
//with default value
Time(const int h = 0, const int m = 0, const int s = 0);
// setter function
void setTime(const int h, const int m, const int s);
// Print a description of object in " hh:mm:ss"
void print() const;
//compare two time object
bool equals(const Time&);
};

#endif
Reply With Quote