online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include "Account.h" // Главная функция. С данной функции происходит вход в программу int main(int argc, char** argv) { Ctime t1{4500}; Ctime t2{2, 35, 21}; Ctime t3; std::cout << t1 <<'\n' << t2<<'\n' << t3; }
#pragma once #include <iostream> class Ctime { public: using T=unsigned int; private: T seconds{}; T minutes{}; T hours{}; public: Ctime()=default; Ctime(T sec) :seconds{sec % (60 * 60) % 60} ,minutes{sec % (60 * 60) / 60} ,hours{sec / (60 * 60)} { } Ctime(T hours, T minutes, T seconds) :seconds{seconds},minutes{minutes},hours{hours} { if (hours >= 24 || minutes >= 60 || seconds >= 60)*this={}; } Ctime operator+(const Ctime& t) const { return {seconds_total()+t.seconds_total()}; } friend std::ostream& operator<<(std::ostream& os, const Ctime& t) { return os << t.hours << " : "<< t.minutes << " : " << t.seconds; } T seconds_total()const { return hours*60*60 + minutes*60 + seconds; } };
#include "Account.h"

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue