随笔-2  评论-1  文章-1  trackbacks-0
  2006年6月27日

istream::operator >>
istream& operator >>( char* psz );

istream& operator >>( unsigned char* pusz );

istream& operator >>( signed char* pssz );

istream& operator >>( char& rch );

istream& operator >>( unsigned char& ruch );

istream& operator >>( signed char& rsch );

istream& operator >>( short& s );

istream& operator >>( unsigned short& us );

istream& operator >>( int& n );

istream& operator >>( unsigned int& un );

istream& operator >>( long& l );

istream& operator >>( unsigned long& ul );

istream& operator >>( float& f );

istream& operator >>( double& d );

istream& operator >>( long double& ld ); (16-bit only)

istream& operator >>( streambuf* psb );

istream& operator >>( istream& (*fcn)(istream&) );

istream& operator >>( ios& (*fcn)(ios&) );

这些是本来>>支持的类型。
对于cin来说,如cin>>(int)a,而输入一字符串,则会使cin陷入错误状态,故在输入之前应该先检查if(isdigit(a))。

posted @ 2006-06-27 21:34 栗子 阅读(452) | 评论 (1)编辑 收藏
虽然在C++中徘徊,到底也觉得像个陌生的客人,找不到那种自如的感觉。

我一直觉得程序这个空间给我一种不同的思维方式,给我一种异样的生活感受,这也是我被吸引到这里的原因。
然而,软件的制作到目前为止给我的感觉就很生活。不是你只要有兴趣就可以的。
他要活着,就不只是得到你的兴趣,你要付出时间,枯燥的忍耐,错误的指责,甚至做好了也没有表扬,那是应该的。
不能像孩子一样,事事都希望得到赞许。
我不能确定是要为生活而生活,还是为理想而生活。开始怀疑那到底是不是我的理想,或者他是我的虚荣。为此,我裹足不前,一直考虑着,该做什么样的决定。
posted @ 2006-06-27 21:05 栗子 阅读(140) | 评论 (0)编辑 收藏
仅列出标题