I need to insert a character array to be part of string stream, but when I output the stream, the array does not appear as it was typed. It comes out as weird characters. This is basically what the code is doing.
Code:char word[4]; strinstream sentence; cin >> word; sentence << "blah blah blah" << word << "blah blah"; cout << sentence.str().c_str();