-
Notifications
You must be signed in to change notification settings - Fork 534
Issues: AllAlgorithms/c
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Author
Label
Projects
Milestones
Assignee
Sort
Issues list
[Bug] Search Bar Not Displaying Results on Movie Recommendations Page
#453
opened Nov 25, 2024 by
Seanpesis
Getting compilation error in this c++ program
#include <iostream>
using namespace std;
class Time
{
int h, m, s;
public:
Time()
{
h = 0, m = 0, s = 0;
}
void setTime();
void show()
{
cout << h << ":" << m << ":" << s;
}
Time operator+(Time);
};
Time Time::operator+(Time t1)
{
Time t;
int a, b;
a = s + t1.s;
t.s = a % 60;
b = (a / 60) + m + t1.m;
t.m = b % 60;
t.h = (b / 60) + h + t1.h;
t.h = t.h % 12;
return t1;
}
int main()
{
Time t1, t2, t3;
cout << "enter the first time";
t1.setTime();
cout << "\n Enter the second time";
t2.setTime();
t3 = t1 + t2;
cout << "\n first time";
t1.show();
cout << "\nsecond time";
t2.show();
cout << "\n sum of times";
t3.show();
return 0;
}
#420
opened Oct 20, 2023 by
Diliphindustani
Previous Next
ProTip!
no:milestone will show everything without a milestone.