Talk:cpp/io/basic istream/operator gtgt
From cppreference.com
Hi, not mentioned on this page is what happens when reading integral types which have leading zeros => are they interpreted as octal? Or "Ox " prefix means they are interpreted has hexadecimal?
scanf family interprets "%i" and the stream of characters the same way as strtol() and strtoul() when the 3rd argument is 0 for the base. Does istream do something similar?
Stephen Howe 185.253.178.113 11:57, 16 March 2022 (PDT)
- this page says "extracts an integer value by calling std::num_get::get()." and clicking through that link gets you to the detailed rules of how each input character is interpreted - there's a lot of rules! --Cubbi (talk) 13:07, 16 March 2022 (PDT)