-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scan Integer with leading zero? #815
Comments
Hi. This needs to use manipulator i have just found it only has
The reason zeros are not skipped by default is that numbers starting with a 0 might be interpreted as octal (base 8) numbers, causing issues for things like IP addresses. This is an unfortunate consequence from UNIX. Scanning with a string literal isn't meant for any kind of string pattern matching. It only means that next part of string in the stream must be that string. fast_io does not use any kind of format string at all. |
BTW, in your example i think you need to set noskipws to be true too so it cannot skip spaces |
Hello!
integer data - 01 02 0003 and so on ..... with leading zero
I Use example
int main()
{
char8_t a,b,c,d;
scan(a,".",b,".",c,".",d);
println(a,".",b,".",c,".",d);
}
if i enter 01.2.3.4 - i have exeption
I've tried
scan("0", a); - work,
but when data no have leading zero, i have exeption
The text was updated successfully, but these errors were encountered: