记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:6:9: error: expected initializer before ‘cin’
    6 |         cin>>a,b,c
      |         ^~~
foo.cc:24:21: error: ‘c’ was not declared in this scope
   24 |                 if (c>b)
      |                     ^
foo.cc:26:25: error: ‘cout’ was not declared in this scope
   26 |                         cout<<c<<b<<a<<endl;
      |                         ^~~~
foo.cc:2:1: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
foo.cc:26:40: error: ‘endl’ was not declared in this scope
   26 |                         cout<<c<<b<<a<<endl;
      |                                        ^~~~
foo.cc:2:1: note: ‘std::endl’ is defined in header ‘<ostream>’; this is probably fixable by adding ‘#include <ostream>’
    1 | #include <stdio.h>
  +++ |+#include <ostream>
    2 | using namespace std;
foo.cc:30:25: error: ‘cout’ was not declared in this scope
   30 |                         cout<<b<<a<<c<<endl;
      |                         ^~~~
foo.cc:30:25: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
foo.cc:30:40: error: ‘endl’ was not declared in this scope
   30 |                         cout<<b<<a<<c<<endl;
      |                                        ^~~~
foo.cc:30:40: note: ‘std::endl’ is defined in header ‘<ostream>’; this is probably fixable by adding ‘#include <ostream>’
foo.cc:34:25: error: ‘cout’ was not declared in this scope
   34 |                         cout<<b<<c<<a<<endl;
      |                         ^~~~
foo.cc:34:25: note: ‘std::cout’ is defined in header ‘<iostream>’; this is probably fixable by adding ‘#include <iostream>’
foo.cc:34:40: error: ‘endl’ was not declared in this scope
   34 |                         cout<<b<<c<<a<<endl;
      |                                        ^~~~
foo.cc:34:40: note: ‘std::endl’ is defined in header ‘<ostream>’; this is probably fixable by adding ‘#include <ostream>’

信息

递交者
类型
递交
语言
C++
递交时间
2025-08-04 15:42:41
评测时间
2025-08-06 06:28:07
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes