I was pretty surprised that there wasn't a question like this already -- I feel like I may be poorly describing this so apologies if this is a duplicate.
I have a program that I pull a line in from stdin with getline, and then want to read integers separated by any kind of whitespace into a linked list. I need to skip past an integer once I read it, and I'm not sure about the best way to do this.
Currently, I have sscanf reading it into a char pointer, atof'ing the char pointer and putting it into my Node value field, and have two loops to respectively skip 1) the integer digits and 2) the whitespace characters.
I feel like there should be a more elegant way to do this, specifically where sscanf reads into an integer pointer instead of a char pointer -- any ideas?