Problem typoswap
User SideQuesting
Submission Time 2025-06-16 14:33:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

typoswap.cpp:3:9: error: ISO C++ forbids declaration of ‘string’ with no type [-fpermissive]
3 | string () {
| ^
typoswap.cpp: In function ‘int string()’:
typoswap.cpp:4:2: error: reference to ‘string’ is ambiguous
4 | string A,B;
| ^~~~~~
In file included from /usr/include/c++/9/iosfwd:39,
from /usr/include/c++/9/ios:38,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from typoswap.cpp:1:
/usr/include/c++/9/bits/stringfwd.h:79:33: note: candidates are: ‘typedef class std::__cxx11::basic_string<char> std::string’
79 | typedef basic_string<char> string;
| ^~~~~~
typoswap.cpp:3: