I guess you are trying to concatenate strings here. WINDOWTITLE+ '-' + string nScore
if WINDOWTITLE is of type std::string it should be enough to write WINDOWTITLE+ '-' + nScore
If WINDOWTITLE is a c string that will not work because operator+ doesn't work on c strings. What you can do is convert the first string to an std::string and everything will follow. std::string(WINDOWTITLE) + '-' + nScore
If you don't want to use std::string at all you will have to use std::strcat but that is just more work so I don't show how to do that.
still have a compile error, your right about what im trying to do its just no working, i posted the code to codepad here http://codepad.org/tGnppb3G you can try to compile it, im using bloodshed dev c++
I don't have windows so I can't compile it but if SetWindowText takes a c string as argument you have to convert it to a c string. SetWindowText(hWndMain,(std::string(WINDOWTITLE) + '-' + nScore + '-' + string nScore).c_str());
Are you sure that works when you run it because I don't think it does. I realize I made a mistake in the code I posted earlier. Try this instead: SetWindowText(hWndMain,(std::string(WINDOWTITLE) + '-' + nScore).c_str());