thanks codeplug, I'm not familiar with those libraries but I'll try looking them up because your solution looks much nicer then mine.... I ended up using strtok() for now until I think of something else, and I also ended up writting partially in C....why is it that some stuff is so much easier in C????? anyways here is what I did:
Code:
void getCommand()
{
int firstVal = 0; //these will hold the values following each command
int secondVal = 0; //except create, setids, and quit
int x, i=0; //simple counter
char buff[256]; //buffer for creation of a set
char *p;
Sets object;
string command; //holds the first word of the user inputed command
string set;
cout << "> ";
cin >> command;
//create a set
if( command == "create" )
{
cout << endl << command;
gets( buff );
p = strtok( buff, " " );
while( p != NULL )
{
if( sscanf( p, "%d", &x ) )
cout << p;
else
printf( "error on token %d: integer expected" );
i++;
p = strtok( NULL, " " );
}
}
any other suggestions are more then welcome!
edit:: the above code is partially made for debugging; the actual int is sent to an array in the program