HI writing a simple payroll output program with Visual Studio 2010... I get the C2110 error while trying to add strings without assigning them to a string object (would be to complicated for the purpose of the program). Here's the piece of the code where I get the error:
the point is to insert special ascii characters, because the program is in french, and to fit the resulting word (ex.: "déductions:") in a single setw()... like if I did what I would normally do,
setw(30) << "Total des d" << char(130) << "ductions:"
the setw() would only apply to the first string, so I would have to use multiple setw().
Now I understand that "strings" in this form are pointers and not string objects and that you can't add pointers, and also I've seen in the reference section that you need at least one string object to use the + operator with strings, so my question is, is there a simple way to do the job without having to declare a string object and insert it in my output, which is obviously what I will have to do if there's no easier way.