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_39098780_9535.cpp: In function 'void bfs()':
0_0_39098780_9535.cpp:17:20: error: call of overloaded 'stoi(std::string&)' is ambiguous
   17 |     int num1 = stoi(s),num2 = stoi(e);
      |                ~~~~^~~
0_0_39098780_9535.cpp:8:5: note: candidate: 'int stoi(std::string)'
    8 | int stoi(string x){
      |     ^~~~
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)
      |   ^~~~
0_0_39098780_9535.cpp:19:23: error: 'num2' was not declared in this scope; did you mean 'num1'?
   19 |     vis[num1] = 1,vis[num2] = 2;
      |                       ^~~~
      |                       num1
0_0_39098780_9535.cpp:26:33: error: call of overloaded 'stoi(std::string&)' is ambiguous
   26 |             int temp = step[stoi(t1)];
      |                             ~~~~^~~~
0_0_39098780_9535.cpp:8:5: note: candidate: 'int stoi(std::string)'
    8 | int stoi(string x){
      |     ^~~~
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)
      |   ^~~~
0_0_39098780_9535.cpp:31:28: error: call of overloaded 'stoi(std::string&)' is ambiguous
   31 |                 num1 = stoi(T1);
      |                        ~~~~^~~~
0_0_39098780_9535.cpp:8:5: note: candidate: 'int stoi(std::string)'
    8 | int stoi(string x){
      |     ^~~~
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)
      |   ^~~~
0_0_39098780_9535.cpp:44:28: error: call of overloaded 'stoi(std::string&)' is ambiguous
   44 |                 num1 = stoi(T1);
      |                        ~~~~^~~~
0_0_39098780_9535.cpp:8:5: note: candidate: 'int stoi(std::string)'
    8 | int stoi(string x){
      |     ^~~~
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)
      |   ^~~~
0_0_39098780_9535.cpp:58:28: error: call of overloaded 'stoi(std::string&)' is ambiguous
   58 |                 num1 = stoi(T1);
      |                        ~~~~^~~~
0_0_39098780_9535.cpp:8:5: note: candidate: 'int stoi(std::string)'
    8 | int stoi(string x){
      |     ^~~~
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)
      |   ^~~~
0_0_39098780_9535.cpp:71:33: error: call of overloaded 'stoi(std::string&)' is ambiguous
   71 |             int temp = step[stoi(t2)];
      |                             ~~~~^~~~
0_0_39098780_9535.cpp:8:5: note: candidate: 'int stoi(std::string)'
    8 | int stoi(string x){
      |     ^~~~
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)
      |   ^~~~
0_0_39098780_9535.cpp:76:28: error: call of overloaded 'stoi(std::string&)' is ambiguous
   76 |                 num2 = stoi(T2);
      |                        ~~~~^~~~
0_0_39098780_9535.cpp:8:5: note: candidate: 'int stoi(std::string)'
    8 | int stoi(string x){
      |     ^~~~
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)
      |   ^~~~
0_0_39098780_9535.cpp:89:28: error: call of overloaded 'stoi(std::string&)' is ambiguous
   89 |                 num2 = stoi(T2);
      |                        ~~~~^~~~
0_0_39098780_9535.cpp:8:5: note: candidate: 'int stoi(std::string)'
    8 | int stoi(string x){
      |     ^~~~
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)
      |   ^~~~
0_0_39098780_9535.cpp:103:28: error: call of overloaded 'stoi(std::string&)' is ambiguous
  103 |                 num2 = stoi(T2);
      |                        ~~~~^~~~
0_0_39098780_9535.cpp:8:5: note: candidate: 'int stoi(std::string)'
    8 | int stoi(string x){
      |     ^~~~
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)
      |   ^~~~


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-07-01 00:52:44, Gzip enabled