Question: #include using namespace std class Time { private: int hr; int min; int sec; public: int getHours() { return hr; } int getMinutes() { return

#include
using namespace std
class Time
{
private:
int hr;
int min;
int sec;
public:
int getHours() { return hr; }
int getMinutes() { return min; }
int getSeconds() { return sec; }
void setHours( int h ) { hr = h; }
void setMinutes( int m ) { min = m; }
void setSeconds( int s ) { sec = s; }
Time() { }
Time(int h, int m, int s)
{
he = h;
min = m;
sec = s;
}
};
class Event
{
private :
Time start_time;
Time end_time;
public :
Time getstart_time()
{
return start_time;
}
Time getend_time()
{
return end_time;
}
void setstart_time(Time a)
{
start_time=a;
}
void setend_time(Time a)
{
end_time=a;
}
};
int main()
{
Time event;
event.setHours(21);
event.setMinutes(21);
event.setSeconds(21);
event.getSeconds();
event.getMinutes();
event.getHours();
Event obj;
obj.setstart_time(event);
return 0;
}
#include using namespace std class Time { private: int hr; int min;

input ompilation failed due to following error(s). main.cpp: In constructor 'Time::Time(int, int, int)': main.cpp:22:2: error: 'hou' was not declared in this scope hou = h; Amen a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!