here is a very simple example of extraction using istringstream
note that, you must not put spaces when reading; eg : 123 / 34
if you want that instead, just use : std::cin >> numerator >> dummy_char >> denominator;
#include <iostream>
#include <sstream>
#include <string>
int main()
{
std::string str( "123/455" );
std::istringstream is( str );
std::size_t i, j = 0;
if( !(is >> i) ) return 1; // extract
is.get(); // get the '/'
if( !(is >> j) ) return 1; // extract
std::cout << i << '/' << j;
}