From: stephan b. <st...@s1...> - 2004-12-17 23:38:11
|
Yo again: IORequest_Get::receive( char *, size_t ); Could i convince you guys to either: a) Add receive( std::string &, size_t ); or b) give me CVS write access so i can? (SF user == sgbeal) ?? It can be implemented in terms of the current receive() by passing a vector<char> to the existing function, then simply copying the result to a std::string. Something like: size_t receive( std::string & s, size_t count ) { typedef vector<char> VC; VC v( count, '\0' ); size_t ret = receive( &v[0], v.size() ); s = std::string( v.begin(), v.begin() + ret ); return ret; } (achtung: untested) (achtung #2: when i find exciting code i send lots of mails. ;) -- ----- st...@s1... http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts |