
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陷入錯誤狀態(tài),故在輸入之前應(yīng)該先檢查if(isdigit(a))。
posted @
2006-06-27 21:34 栗子 閱讀(481) |
評論 (1) |
編輯 收藏
雖然在C++中徘徊,到底也覺得像個陌生的客人,找不到那種自如的感覺。
我一直覺得程序這個空間給我一種不同的思維方式,給我一種異樣的生活感受,這也是我被吸引到這里的原因。
然而,軟件的制作到目前為止給我的感覺就很生活。不是你只要有興趣就可以的。
他要活著,就不只是得到你的興趣,你要付出時間,枯燥的忍耐,錯誤的指責(zé),甚至做好了也沒有表揚,那是應(yīng)該的。
不能像孩子一樣,事事都希望得到贊許。
我不能確定是要為生活而生活,還是為理想而生活。開始懷疑那到底是不是我的理想,或者他是我的虛榮。為此,我裹足不前,一直考慮著,該做什么樣的決定。
posted @
2006-06-27 21:05 栗子 閱讀(165) |
評論 (0) |
編輯 收藏