fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Time {
  5. public:
  6. int hour; //0-23
  7. int minute; //0-59
  8. int second; //0-59
  9. };
  10.  
  11. int main() {
  12. Time clock;
  13. Time *clockPtr = &clock;
  14.  
  15. clock.hour=8;
  16. clock.minute=12;
  17. (*clockPtr).second=0;
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0s 3292KB
stdin
Standard input is empty
stdout
Standard output is empty