/ Vijos /

记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:12:1: error: ‘cin’ was not declared in this scope
   12 | cin >> contest[total];
      | ^~~
foo.cc:4:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
    3 | #include<cmath>
  +++ |+#include <iostream>
    4 | 
foo.cc:21:1: error: ‘cout’ was not declared in this scope
   21 | cout << win << ":" << lose << endl;
      | ^~~~
foo.cc:21:1: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
foo.cc:21:31: error: ‘endl’ was not declared in this scope
   21 | cout << win << ":" << lose << endl;
      |                               ^~~~
foo.cc:4:1: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’?
    3 | #include<cmath>
  +++ |+#include <ostream>
    4 | 
foo.cc:25:1: error: ‘cout’ was not declared in this scope
   25 | cout << win << ":" << lose << endl << endl;
      | ^~~~
foo.cc:25:1: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
foo.cc:25:31: error: ‘endl’ was not declared in this scope
   25 | cout << win << ":" << lose << endl << endl;
      |                               ^~~~
foo.cc:25:31: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’?

信息

递交者
类型
递交
题目
P1217 乒乓球
语言
C++
递交时间
2024-05-04 04:26:00
评测时间
2024-05-04 04:26:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes