Borderou de evaluare (job #1837367)

Utilizator bent_larsenSturzu Antonio-Gabriel bent_larsen Data 29 decembrie 2016 16:12:19
Problema Invsort Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int rec(int, int, int)’: user.cpp:65:28: error: call of overloaded ‘to_string(int)’ is ambiguous sol += to_string(p1 + 1); ^ user.cpp:65:28: note: candidates are: user.cpp:22:8: note: std::string to_string(int) string to_string(int n) ^ In file included from /usr/include/c++/4.8/string:52:0, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from user.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2916:3: note: std::string std::to_string(long double) to_string(long double __val) ^ /usr/include/c++/4.8/bits/basic_string.h:2907:3: note: std::string std::to_string(double) to_string(double __val) ^ /usr/include/c++/4.8/bits/basic_string.h:2898:3: note: std::string std::to_string(float) to_string(float __val) ^ /usr/include/c++/4.8/bits/basic_string.h:2892:3: note: std::string std::to_string(long long unsigned int) to_string(unsigned long long __val) ^ /usr/include/c++/4.8/bits/basic_string.h:2886:3: note: std::string std::to_string(long long int) to_string(long long __val) ^ /usr/include/c++/4.8/bits/basic_string.h:2880:3: note: std::string std::to_string(long unsigned int) to_string(unsigned long __val) ^ /usr/include/c++/4.8/bits/basic_string.h:2875:3: note: std::string std::to_string(long int) to_string(long __val) ^ /usr/include/c++/4.8/bits/basic_string.h:2869:3: note: std::string std::to_string(unsigned int) to_string(unsigned __val) ^ /usr/include/c++/4.8/bits/basic_string.h:2864:3: note: std::string std::to_string(int) to_string(int __val) ^ user.cpp:67:24: error: call of overloaded ‘to_string(int&)’ is ambiguous sol += to_string(p2) + "\n"; ^ user.cpp:67:24: note: candidates are: user.cpp:22:8: note: std::string to_string(int) string to_string(int n) ^ In file included from /usr/include/c++/4.8/string:52:0,

Ceva nu functioneaza?