++




- 2


int main()

{

int ival = 1024; int *pival = &ival;

double dval = 3.14159; double *pdval = &dval;

ostringstream format_message;

//

format_message << "ival: " << ival

<< " ival: " << pival << 'n'

<< "dval: " << dval

<< " dval: " << pdval << endl;

string msg = format_message.str();

cout << " : " << msg.size()

<< " : " << msg << endl;

}

, . :

string

format( string msg, int expected, int received )

{

ostringstream message;

message << msg << " : " << expected

<< " : " << received << "\n";

return message.str();

}

string format( string msg, vector<int> *values );

// ...

. Notify (), Log () Error ().

istringstream string, . , :

#include <iostream>

#include <sstream>

#include <string>

int main()

{

int ival = 1024; int *pival = &ival;

double dval = 3.14159; double *pdval = &dval;

// ,