Please, please, please. I know this is a very long code in here and I know what the problem is but I don't know how to fix it. I want to increment track by one,. I belive its incrementing by one, but when track =1,2,3,4. The else if statements don't work. can anyone please help me with this?
enum alphbet {a,b};
void printoutusersentence ( string &usertypes)
{
//User types in a sentence
cout<<"\n\nType in a sentence: ";
cin>>usertypes;
//Declare index to find the character in a string
int index=0;
int track=0;
//start a for loop that will keep track of each row to be printed
for (int track=0;track<5;track++);
{//start of for loop
//reset index
index=0;
do
{//start do while parenthesis
//declare a variable to store in a character. Declare enum type variable to store in a value
alphbet store_letter_score;
char letterstore=usertypes[index];
switch (letterstore)
{//start switch structure parthesis
case'a':store_letter_score=a;
break;
case'b':store_letter_score=b;
break;
}//End switch structure parenthesis
//do if statements
//if track is zero print row 1
if (track==0)
{
for (int col=0;col<1;col++)
cout<<letters[store_letter_score][col];
}
//If track is one print row 2
elseif (track==1)
{
for(int col=1;col<2;col++)
cout<<letters[store_letter_score][col];
}
//If track is 2 print row 3
elseif (track==2)
{
for(int col=2;col<3;col++)
cout<<letters[store_letter_score][col];
}
//If track is 3 print row 4
elseif (track==3)
{
for(int col=3;col<4;col++)
cout<<letters[store_letter_score][col];
}
//If tract is 4 print row 5
elseif (track==4)
{
for(int col=4;col<5;col++)
cout<<letters[store_letter_score][col];
}
index++;
}//end do while loop
while (index<usertypes.length());
cout<<endl;
} //end for while loop
}