011
29.11.2007, 22:17 Uhr
0xdeadbeef
Gott (Operator)
|
Zitat von ISO/IEC 14882:2003(E), Sektion 27.6.3.5: |
smanip setbase(int base); Returns: An object s of unspecified type such that if out is an (instance of) basic_ostream then the expression out<<s behaves as if f(s) were called, in is an (instance of) basic_istream then the expression in>>s behaves as if f(s) were called. Where f can be defined as:
C++: |
ios_base& f(ios_base& str, int base) { // set basefield str.setf(base == 8 ? ios_base::oct : base == 10 ? ios_base::dec : base == 16 ? ios_base::hex : ios_base::fmtflags(0), ios_base::basefield); return str; }
|
The expression out<<s has type ostream& and value out. The expression in>>s has type istream& and value in.
|
...also ist std::setbase(2) wieder meines Erwartens völliger Unfug, die Ausgabe, die Hans kriegt, ist vollkommen richtig, und ich streue jetzt ne halbe Stunde lang Asche auf mein Haupt. ![](images/smilies/surrender.gif)
Im Übrigen möchte ich anmerken, dass ich sehr wohl allwissend und allmächtig bin. Was bedeutet, ich kann mich auch irren. Zittert vor meiner Macht! -- Einfachheit ist Voraussetzung für Zuverlässigkeit. -- Edsger Wybe Dijkstra Dieser Post wurde am 29.11.2007 um 22:18 Uhr von 0xdeadbeef editiert. |