I have written a small function for myself recently that seperates a string into smaller ones. However, I think that it could be muuuuuuuch easier with the correct method (that i don' know :/). Hope it'll help. You have to modify my code ofc, and there is only 1 seperation char allowed. Needs to be improved. Heres the code:
Danke Lukas, ich verstehe embischen Deutsch,
but in my case i read online from a file so am no sure the condition in the while loop will work s.find?
sorry am a beginner
:)
You only need to get the string from the internet and save it into a variable, so the string gets processed in your program. (Does your file contain any wordwraps, or is it a single line of hundreds of unsigned integers ?)
I program for some years now, but I would still consider myself as a beginner due to my low level in programming aswell...
The s.find in the while condition gives some huge integer, if there is no specified char left in the string, that's how it works. But this seems to be very unelegant, so I hope some pr0 will look at this topic and will comment my code.
The following example reads from a stringstream (can be replaced with a file stream). The default terminator for getline is CR/LF, the second one I use a space to break up each line. So this deals with multiple lines. My sample data has a '\n' between the 3rd and 4th numbers.