I'm not quite sure what you're asking. Do you want to convert a string formatted as x,y to two integers and make a point object out of that? If so you can use stringstream to parse the input into ints:
Code:
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
struct point {
int x;
int y;
point()
: x ( 0 )
, y ( 0 )
{}
point ( int x, int y )
: x ( x )
, y ( y )
{}
};
int main()
{
string s ( "12,36" );
istringstream iss ( s );
int new_x;
int new_y;
iss>> new_x;
iss.ignore();
iss>> new_y;
point new_point ( new_x, new_y );
cout<< new_point.x <<' '<< new_point.y;
}