F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39852333_23234.cpp: In function 'int main()':
0_0_39852333_23234.cpp:20:32: error: no matching function for call to 'stoi(int&)'
   20 |         int birth_year_int=stoi(birth_year_int);
      |                            ~~~~^~~~~~~~~~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:54,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bitset:52,
                 from .\stdc++.h:52:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:4119:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4119 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:4119:22: note:   no known conversion for argument 1 from 'int' to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4119 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:4271:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4271 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:4271:23: note:   no known conversion for argument 1 from 'int' to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4271 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
0_0_39852333_23234.cpp:22:55: error: expected ';' before '}' token
   22 |         vec.push_back(make_pair(birth_year_int, name))
      |                                                       ^
      |                                                       ;
   23 | 
   24 |     }
      |     ~                                                  


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-12-05 06:55:21, Gzip enabled