Hello...
I wrote a c++ program in which I received a std::string type variable. The initialization is as:
std::string *items = new string[count];
I am not able to get the output of the string with:
cout<< item[i];
Is there any other method to print such type of a sting?
Thanks....
Thanks for the reply...
I already included the header file. I receive this error:
error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)
thanks...
What compiler are you using?
Your code:
is wrong. The problem is at namespace. In order to solve this problem, you can write like this
, or you can declare namespace at this program begin with using
Last edited on
In that case, wouldn't he just get an undeclared identifier error?