Closed
Description
Hi. Modifying the first example given in the README, I have:
#include <scn/scn.h>
#include <cstdio>
int main() {
int i, j;
// Read an integer from stdin
// with an accompanying message
auto res = scn::prompt("What's your favorite number? ", "{}", i);
scn::scan(res.range(), "{}", j);
printf("Oh, cool, %d!\n", i);
printf("Oh, even cooler, %d!\n", j);
}
// Example invocation:
// What's your favorite number? 345 6789
// Oh, cool, 345!
// Oh, even cooler, 9!
My "678" got eaten unexpectedly!
Please make scnlib give it back, or if this is expected, document obviously the behavior of using range() to scan leftover input from different possible types.
I am using version 1.1