I am trying to read in a user defined string. The user will enter two floats, and a name. The three items are separated by a single space. I'm trying to break up the three by sscanf and save the two numbers as separate floats and the name as a string. I know this doesn't work, Is the only way to use the single spaces to my advantage and break (the user defined entered things) the string up and read the parts I want and assign them separately!
thanks for looking......cheers
Code:printf("\nPlease type in two float values and one of the first names,\n"); printf("followed by all of which are separated by a single space:\n"); sscanf("%f","%f","%s",float &num1, float &num2, char *p_user);