I have a problem that sscanf solves (extracting things from a string). I don\'t like sscanf though since it\'s not type-safe and is old and horrible. I want to be clever and
Try std::stringstream:
#include ... std::stringstream s("123 456 789"); int a, b, c; s >> a >> b >> c;