#include <strstream> #include <iostream> using namespace std; int main() { char *p; ostrstream outs; outs << "AAAAAAAAAAAAAAAAAAAA"; outs << -10 << hex << " "; outs.setf(ios::showbase); outs << 100 << ends; p = outs.str(); cout << p; return 0; }
AAAAAAAAAAAAAAAAAAAA-10 0x64"