If the comments in your code are correct, then your code should look like this:
Code:
int main()
{
char engine[6];
char major[5];
char minor[5];
// open file
infile.ignore(6,'\n'); // ignores the first 6 spaces or finds \n
infile.getline(engine,6); // assigns the next 5 to engine
/* so far it works fine, now I'm trying to get to the other side of
the space to pick-up the major and minor cycles.*/
infile.ignore(14, '\n');
infile.getline(major,5);
Some comments. First to store strings, character arrays should be one bigger than the size of the string (room for the string terminator). So:
char engine[6]; //Holds five characters plus terminator
char major[5]; //Holds four characters plus terminator
char minor[5]; //Holds four characters plus terminator
Each getline should match with the size declared.
infile.getline(engine,6); // assigns the next 5 to engine
infile.getline(major,5);