the code below gives this error:
what is the problem here?
cxx: Error: str1.cpp, line 8: left operand of the "." operator must have a
class type
A.size();
---------^
cxx: Info: 1 error detected in the compilation of "str1.cpp".
what is the problem here?
cxx: Error: str1.cpp, line 8: left operand of the "." operator must have a
class type
A.size();
---------^
cxx: Info: 1 error detected in the compilation of "str1.cpp".
Code:
#include <iostream> #include <string> int main() { string A(); A.size(); return 0; }
Comment