(C++) How move to next line while reading from file

I am writing a program where I need to read two integers, and two words from each line of the input file. However some of the lines in the input file only have one integer, or some might have more than the four values. How do I make it so that my program only reads the first four values in the line, and then moves on to the next line? Thanks

This is my code:

//Variables
double NickelWeight = 0.0;
double NickelDiameter = 0.0;
double DimeWeight = 0.0;
double DimeDiameter = 0.0;
double QuarterWeight = 0.0;
double QuarterDiameter = 0.0;
double LoonieWeight = 0.0;
double LoonieDiameter = 0.0;
double ToonieWeight = 0.0;
double ToonieDiameter = 0.0;

int tries = 0;


ofstream OutFile;
ifstream InFile;
char InputName[1500] = {'\0'};
char OutputName[1500] = {'\0'};
string Lines;
int NumberOfLines = 0;

int count = 0;
int NextLine = 0;

int Weight = 0;
int Diameter = 0;


int LineNumber = 0;
string Condition;
string Picture;

//Constants

const int MAX_NICKELS_PER_ROLL = 40;
const int MAX_DIMES_PER_ROLL = 50;
const int MAX_QUARTERS_PER_ROLL = 40;
const int MAX_LOONIES_PER_ROLL = 25;
const int MAX_TOONIES_PER_ROLL = 25;

const double MAX_NICKEL_WEIGHT = 4.30;
const double MIN_NICKEL_WEIGHT = 3.60;
const double MAX_DIME_WEIGHT = 2.20;
const double MIN_DIME_WEIGHT = 1.30;
const double MAX_QUARTER_WEIGHT = 4.80;
const double MIN_QUARTER_WEIGHT = 4.00;
const double MAX_LOONIE_WEIGHT = 7.50;
const double MIN_LOONIE_WEIGHT = 6.50;
const double MAX_TOONIE_WEIGHT = 7.85;
const double MIN_TOONIE_WEIGHT = 6.75;

const double MAX_NICKEL_DIAMETER = 21.8;
const double MIN_NICKEL_DIAMETER = 20.2;
const double MAX_DIME_DIAMETER = 18.7;
const double MIN_DIME_DIAMETER = 17.3;
const double MAX_QUARTER_DIAMETER = 24.6;
const double MIN_QUARTER_DIAMETER = 22.8;
const double MAX_LOONIE_DIAMETER = 27.0;
const double MIN_LOONIE_DIAMETER = 25.0;
const double MAX_TOONIE_DIAMETER = 29.1;
const double MIN_TOONIE_DIAMETER = 26.9;

const int MIN_LINES = 1;
const int MAX_LINES = 5000;
const int MAX_TRIES = 3;

const string BENT = "bent";
const string USABLE = "usable";
const string BOTH_MATCH = "BothMatch";
const string ONE_MATCH = "OneMatch";
const string NO_MATCH = "NoMatch";
const char Set[10] = {'\0'};

const int MAX_INTEGER = 255;
const int MIN_INTEGER = 0;
int input = 0;
char myarray[4]= {0};



do 
    {


        if (tries >0)
        {
            cerr << "ERROR: File " << InputName <<  " could not be opened for input" << endl;
        }

        if (tries >= MAX_TRIES)
        {
            cerr << "ERROR: You exceeded maximum number of tries allowed" << endl;
            cerr << "while entering the input file name" << endl;
            return 1;
        }

        cout << "Type the name of the input file containing sensor readings: " << endl;
        cin >> InputName;

        InFile.open(InputName);
        tries++;


    } 

    while (InFile.fail() );

tries = 0;

    do 
    {
        if (tries > 0)
        {
            cerr << "ERROR: File " << OutputName <<  " could not be opened for output" << endl;
        }

        if (tries >= MAX_TRIES)
        {
            cerr << "ERROR: You exceeded maximum number of tries allowed" << endl;
            cerr << "while entering the output file name" << endl;
            return 1;
        }

        cout << "Type the name of the output file which will hold the simulation results:  " << endl;
        cin >> OutputName;

        OutFile.open(OutputName);
        tries++;


    } 

    while (OutFile.fail() );

    if( !(InFile >> NumberOfLines) )
    {
        if ( InFile.eof() )
        {
            cerr << "ERROR: Input data file is empty";
            InFile.close();
            return 2;
        }
        else
        {
            cerr << "ERROR: First piece of data in the file is not an integer";
            InFile.close();
            return 3;
        }
    }

    if (NumberOfLines < MIN_LINES || NumberOfLines > MAX_LINES)
    {
        cerr << "ERROR: The number of sensor readings is out of range";
        InFile.close();
        return 4;
    }



    for (count = 0; count < NumberOfLines; count++)
    {


        if ( !(InFile >> Weight) )
        {


            if (InFile.eof() )
            {
                cerr << "ERROR: No more data" << endl;
                cerr << "Simulation completed early before line " << count +1 << " of input" << endl;
                break;
            }
            else
            {
            cerr << "ERROR: Weight sensor value read on line " << count + 1 << " is not an integer" << endl;
            cerr << "Simulation terminated early: Please correct your data file";
            break;
            }
        }




        if ( !(InFile >> Diameter) )
        {


            if (InFile.eof() )
            {
                cerr << "ERROR: Weight sensor measurement only" << endl;
                cerr << "Ignoring line " << count + 1 << " of the input file" << endl;
                break;
            }
            else
            {
            cerr << "ERROR: Diameter sensor value read on line " << count + 1 << " is not an integer" << endl;
            cerr << "Simulation terminated early: Please correct your data file";
                break;
            }
        }

        InFile >> Condition;

        if (BENT != Condition && USABLE != Condition)
        {


            if (Condition == Set)
            {
                cerr << "ERROR: Weight and diameter sensor measurements only" << endl;
                cerr << "Ignoring line " << count + 1 << " of the input file" << endl;
                break;
            }
            else
            {
            cerr << "ERROR: Result of test to determine if coin is bent at line " << count +1 << " is invalid" << endl;
            cerr << "Ignoring this line of data" << endl;
            exit;
            }

        }


        InFile >> Picture;
        if (BOTH_MATCH != Picture && ONE_MATCH != Picture && NO_MATCH != Picture)
        {
            if (Picture == Set)
            {
                cerr << "ERROR: Weight and diameter sensor measurements and bent string only" << endl;
                cerr << "Ignoring line " << count +1 << " of the input file" << endl;
                break;
            }
            else
            {
            cerr << "ERROR: image processing result at line " << count +1 << " is invalid" << endl;
            cerr << "Ignoring this line of data"<< endl;
            exit;
            }
        }

        if ( Weight < MIN_INTEGER || Weight > MAX_INTEGER || Diameter < MIN_INTEGER || Diameter > MAX_INTEGER)
        {
            cerr << "ERROR: Sensor reading out of range, ignoring line " << count +1 << " in the input file" << endl;;
            break;
        }

        cout << Weight << " " << Diameter << " " << Condition << " " << Picture << endl;
    }



    return 0;

}

This is what my input file looks like: 149

44 68 usable BothMatch

97 97 usable NoMatch

107 117 usable NoMatch

171 131 usable NoMatch

180 160 usable NoMatch

44

44 68

44 68 usable

103 256 usable BothMatch extra stuff

101 235 somthingElse BothMatch