Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:7:20: error: request for member 'size' in 'st', which is of non-class type 'int'
  for(int i=0;i<=st.size();i++)
                    ^~~~
/in/foo.cc:9:10: error: invalid types 'int[int]' for array subscript
   if(st[i]>='0'&&st[i]<='9')
          ^
/in/foo.cc:9:22: error: invalid types 'int[int]' for array subscript
   if(st[i]>='0'&&st[i]<='9')
                      ^
/in/foo.cc:10:4: error: 'ans' was not declared in this scope
    ans=ans*16+st[i]-'0';
    ^~~
/in/foo.cc:10:19: error: invalid types 'int[int]' for array subscript
    ans=ans*16+st[i]-'0';
                   ^
/in/foo.cc:12:4: error: 'ans' was not declared in this scope
    ans=ans*16+st[i]-'A'+10;
    ^~~
/in/foo.cc:12:19: error: invalid types 'int[int]' for array subscript
    ans=ans*16+st[i]-'A'+10;
                   ^
/in/foo.cc:14:8: error: 'ans' was not declared in this scope
  cout<<ans;
        ^~~

信息

递交者
类型
递交
比赛
2024.11.16秋季中级班练习
语言
C++
递交时间
2024-11-23 07:46:22
评测时间
2024-11-23 07:46:22
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes