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_28350117_19290.cpp: In function 'int main()':
0_0_28350117_19290.cpp:65:22: error: call of overloaded 'to_string(int)' is ambiguous
   s = to_string(n - 1);
                      ^
0_0_28350117_19290.cpp:65:22: note: candidates are:
0_0_28350117_19290.cpp:8:8: note: std::string to_string(int)
 string to_string(int n) {
        ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
                 from 0_0_28350117_19290.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2951:3: note: std::string std::to_string(long double)
   to_string(long double __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2942:3: note: std::string std::to_string(double)
   to_string(double __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2933:3: note: std::string std::to_string(float)
   to_string(float __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2927:3: note: std::string std::to_string(long long unsigned int)
   to_string(unsigned long long __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2921:3: note: std::string std::to_string(long long int)
   to_string(long long __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2915:3: note: std::string std::to_string(long unsigned int)
   to_string(unsigned long __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2910:3: note: std::string std::to_string(long int)
   to_string(long __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2904:3: note: std::string std::to_string(unsigned int)
   to_string(unsigned __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2899:3: note: std::string std::to_string(int)
   to_string(int __val)
   ^
0_0_28350117_19290.cpp:66:19: error: call of overloaded 'to_string(int&)' is ambiguous
   s1 = to_string(m);
                   ^
0_0_28350117_19290.cpp:66:19: note: candidates are:
0_0_28350117_19290.cpp:8:8: note: std::string to_string(int)
 string to_string(int n) {
        ^
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
                 from 0_0_28350117_19290.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2951:3: note: std::string std::to_string(long double)
   to_string(long double __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2942:3: note: std::string std::to_string(double)
   to_string(double __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2933:3: note: std::string std::to_string(float)
   to_string(float __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2927:3: note: std::string std::to_string(long long unsigned int)
   to_string(unsigned long long __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2921:3: note: std::string std::to_string(long long int)
   to_string(long long __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2915:3: note: std::string std::to_string(long unsigned int)
   to_string(unsigned long __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2910:3: note: std::string std::to_string(long int)
   to_string(long __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2904:3: note: std::string std::to_string(unsigned int)
   to_string(unsigned __val)
   ^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2899:3: note: std::string std::to_string(int)
   to_string(int __val)
   ^


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-11-17 12:32:45, Gzip enabled