How about the strtok() function?
http://www.cppreference.com/stdstring/strtok.html