+ 2
You can use strtok() to find the delimiter character, i.e. " ", and atoi() to do the actual conversion, and repeat this procedure until the end of the string has been reached (no more delimiter tokens). strtok: https://en.cppreference.com/w/c/string/byte/strtok atoi: https://en.cppreference.com/w/c/string/byte/atoi
4th Apr 2020, 10:46 AM
Shadow
Shadow - avatar