online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; class Tiempo { public: Tiempo(int h=0, int m=0) : hora(h), minuto(m) {} void Mostrar(); operator int() { return hora*60+minuto; } private: int hora; int minuto; }; void Tiempo::Mostrar() { cout << hora << ":" << minuto << endl; } int main() { Tiempo Ahora(12,24); int minutos; Ahora.Mostrar(); minutos = static_cast<int> (Ahora); // minutos = Ahora; // Igualmente legal, pero implícito cout << minutos << endl; return 0; }

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