I'm trying to get strstream to work and its not working right. Both these code output stuff to a string except that it doesn't put a null so the output just keeps going until a zero. I'm using unmanaged VC.NET.
Code:char buffer[1024]; ostrstream s(buffer, sizeof(buffer); s << "hey" << uppercase << hex << 255 << endl; // will work with this here, but it should even without: // str[s.pcount()]=0; cout << s.str();Output of both codes (nothing else is printed):Code:strstream s; s << "hey" << uppercase << hex << 255 << endl; cout << s.str();
Code:heyFF ══════════════════════════²²²²½½½½½½½½ε■ε■



LinkBack URL
About LinkBacks


