Originally Posted by 7stud
Really? When looking at the constructors for the std:string class, I didn't see any that took an int argument. In addition, my compiler gave me this error when I tested it:
C:\Beginning C++\test2\main.cpp(14) : error C2664: '__thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(const class std::allo
cator<char> &)' : cannot convert parameter 1 from 'const int' to 'const class std::allocator<char> &'
Reason: cannot convert from 'const int' to 'const class std::allocator<char>'
No constructor could take the source type, or constructor overload resolution was ambiguous