fork download
  1. #include <iostream>
  2.  
  3. Struct klokke
  4. {
  5. int timer,minuter,sekunder
  6. };
  7. const int minmin,maxmin,mintimer,maxtimer,
  8. minsek,maxsek;
  9.  
  10. int main
  11. {
  12. struct tid1[0.0.0],
  13. tid2[0.0.0],
  14. temp;
  15. int valg, totalsek,
  16.  
  17.  
  18. std::cout << "klokke 1 er " << tid1
  19. <<"Vil du endre den?";
  20. std::cin >> valg
  21.  
  22. if (valg=='j' || valg== 'J')
  23. std::cin>> temp.timer>>temp.minuter
  24. >> temp.sekunder;
  25. temp=tid1
  26. std::cout<< "Klokke 1 er na "<<tid1;
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48. return 0;
  49.  
  50. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:12:13: error: too many decimal points in number
 struct tid1[0.0.0],
             ^
prog.cpp:13:13: error: too many decimal points in number
        tid2[0.0.0],
             ^
prog.cpp:3:1: error: ‘Struct’ does not name a type
 Struct klokke
 ^
prog.cpp:7:11: error: uninitialized const ‘minmin’ [-fpermissive]
 const int minmin,maxmin,mintimer,maxtimer,
           ^
prog.cpp:7:18: error: uninitialized const ‘maxmin’ [-fpermissive]
 const int minmin,maxmin,mintimer,maxtimer,
                  ^
prog.cpp:7:25: error: uninitialized const ‘mintimer’ [-fpermissive]
 const int minmin,maxmin,mintimer,maxtimer,
                         ^
prog.cpp:7:34: error: uninitialized const ‘maxtimer’ [-fpermissive]
 const int minmin,maxmin,mintimer,maxtimer,
                                  ^
prog.cpp:8:1: error: uninitialized const ‘minsek’ [-fpermissive]
 minsek,maxsek;
 ^
prog.cpp:8:8: error: uninitialized const ‘maxsek’ [-fpermissive]
 minsek,maxsek;
        ^
prog.cpp:10:5: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
 int main 
     ^
prog.cpp:12:1: error: expected primary-expression before ‘struct’
 struct tid1[0.0.0],
 ^
prog.cpp:12:1: error: expected ‘}’ before ‘struct’
prog.cpp:12:1: error: expected ‘,’ or ‘;’ before ‘struct’
prog.cpp:18:14: error: expected initializer before ‘<<’ token
    std::cout << "klokke 1 er " << tid1
              ^
prog.cpp:20:4: error: ‘cin’ in namespace ‘std’ does not name a type
    std::cin  >> valg   
    ^
prog.cpp:25:5: error: ‘temp’ does not name a type
     temp=tid1
     ^
prog.cpp:48:1: error: expected unqualified-id before ‘return’
 return 0;
 ^
prog.cpp:50:1: error: expected declaration before ‘}’ token
 }
 ^
stdout
Standard output is empty