Record Detail

Compile Error

/in/HW8.cpp: In function 'int main()':
/in/HW8.cpp:28:1: error: 'cin' was not declared in this scope
 cin >> x >> y >> z >> ct; // input the coordinates of the second spacetime event
 ^~~
/in/HW8.cpp:28:1: note: suggested alternative:
In file included from /in/HW8.cpp:1:0:
/usr/include/c++/7/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^~~
/in/HW8.cpp:30:1: error: 'cout' was not declared in this scope
 cout << st1.Interval(st2) << endl; // output the interval
 ^~~~
/in/HW8.cpp:30:1: note: suggested alternative:
In file included from /in/HW8.cpp:1:0:
/usr/include/c++/7/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^~~~
/in/HW8.cpp:30:30: error: 'endl' was not declared in this scope
 cout << st1.Interval(st2) << endl; // output the interval
                              ^~~~
/in/HW8.cpp:30:30: note: suggested alternative:
In file included from /usr/include/c++/7/iostream:39:0,
                 from /in/HW8.cpp:1:
/usr/include/c++/7/ostream:590:5: note:   'std::endl'
     endl(basic_ostream<_CharT, _Traits>& __os)
     ^~~~

Information

Submit By
Type
Submission
Homework
Homework#8
Language
C++
Submit At
2023-12-03 20:04:55
Judged At
2023-12-03 20:04:55
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes