Writing a stl string to the screen
Posted on 2001-06-07
I am trying to simply write a string which has been declared as std::string. I have a function
which returns that data type. However, when I call the function and say cout<<(function name), I get the error that there is no right hand side operator which can be used with <<. It says the right hand side is of type std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >.
I have no clue what all this means and how to fix it.
Any suggestions would be greatly appreciated.