/ SeriousOJ /

Record Detail

Compile Error

foo.cc: In function 'int main()':
foo.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> a >> b;
      |         ^~~
      |         std::cin
In file included from foo.cc:1:
/usr/include/c++/13/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
foo.cc:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout << a-b;
      |         ^~~~
      |         std::cout
/usr/include/c++/13/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~

Code

#include <iostream>

int main()
{
    int a, b;
	cin >> a >> b;
	cout << a-b;
}

Information

Submit By
Type
Submission
Problem
P1226 Event Registration
Contest
LUCC Presents Intra LU Junior Programming Contest - Replay
Language
C++17 (G++ 13.2.0)
Submit At
2025-09-02 15:42:28
Judged At
2025-09-02 15:42:28
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes