Problem shortest
User LimCheeHann
Submission Time 2026-03-08 17:00:50
Score 0
Max Time N/A
Max Memory N/A

Compile Error

shortest.cpp: In function ‘std::string multiplication(std::string, std::string)’:
shortest.cpp:104:20: error: could not convert ‘addition’ from ‘std::string (*)(std::string, std::string)’ {aka ‘std::__cxx11::basic_string<char> (*)(std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>)’} to ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}
104 | answer=addition(addition,A);
| ^~~~~~~~
| |
| std::string (*)(std::string, std::string) {aka std::__cxx11::basic_string<char> (*)(std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>)}
shortest.cpp: In function ‘int main()’:
shortest.cpp:133:6: error: ambiguous overload for ‘operator=’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘int’)
133 | pos=0;
| ^
In file included from /usr/include/c++/9/string:55,