Compile Error

foo.cc:6:2: error: stray ‘#’ in program
    6 | {#include<bits/stdc++.h>
      |  ^
foo.cc: In function ‘int main()’:
foo.cc:6:3: error: ‘include’ was not declared in this scope
    6 | {#include<bits/stdc++.h>
      |   ^~~~~~~
foo.cc:6:11: error: ‘bits’ was not declared in this scope
    6 | {#include<bits/stdc++.h>
      |           ^~~~
foo.cc:6:16: error: ‘stdc’ was not declared in this scope; did you mean ‘std’?
    6 | {#include<bits/stdc++.h>
      |                ^~~~
      |                std
foo.cc:7:1: error: expected primary-expression before ‘using’
    7 | using namespace std;
      | ^~~~~
foo.cc:10:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   10 | int main()
      |         ^~
foo.cc:10:9: note: remove parentheses to default-initialize a variable
   10 | int main()
      |         ^~
      |         --
foo.cc:10:9: note: or replace parentheses with braces to value-initialize a variable
foo.cc:11:1: error: a function-definition is not allowed here before ‘{’ token
   11 | {
      | ^
foo.cc:38:33: error: invalid use of member function ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’ (did you forget the ‘()’ ?)
   38 |                 for(int i=0;i<s.size;i++)
      |                               ~~^~~~
      |                                     ()

信息

递交者
类型
递交
题目
P2598 进制判断3级2 202309
语言
C++
递交时间
2026-08-26 16:31:54
评测时间
2026-08-26 16:31:54
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes