[Effective-cpp] Item 19: Understand the origin of temporary o bjects
Adrian Fagg
AdrianF at evaluategroup.com
Wed Mar 19 08:41:48 EST 2003
I thought that I'd better read that item...
Page 99 has
char buffer[MAX_STRING_LEN];
...
cin ... >> setw(MAX_STRINGLEN) >> buffer;
...
then use buffer as a char * to create a string...
Now, I always run away when I see C++ streams, so I never quite know what's
what with the things.
However, in this curious mixture of C and C++, the above looks suspicious to
me - is buffer big enough?
Regards,
Adrian
Work: mailto:adrianf at evaluategroup.com
Home: mailto:adrian.fagg at ntlworld.com
Pretty pictures: http://homepage.ntlworld.com/rbyadf/
> -----Original Message-----
> From: Roy Varghese [mailto:rvarghese at users.sourceforge.net]
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
More information about the Effective-cpp
mailing list