You can use sscanf from stdio. It's like scanf, except it's used on a char* instead of stdin.
sscanf("640x480x32", "%dx%dx%d", &num1, &num2, &num3);
You can also write your own function to parse it.
But I have a feeling that it is possible to parse it with just string stream and a few << operators.