I am a programming student who requires help. I've asked what other students I could and I couldn't get help from them. I need to complete this and I keep getting errors. My program isn't running properly. Here is my code and if someone could help soon that would be great. THANK YOU!
#include <iostream>
#include <fstream>
#include <string>

using namespace std;
int main()
{

string guess[5];
int counter;
int choice;
int name;
int hint;

counter = 0; counter++;
ifstream infile;
ofstream outfile;
infile.open("Guess.txt");
infile >> guess[5];
cout << "This is an Animal Guessing Game." << endl;
cout << "After each guess you get a clue as to what the animal is." << endl;
infile.close();
outfile.open("Guess.txt");
outfile << guess[5];
outfile.close();
while (counter < 5)
{
cout << "What animal am I?" << hint[counter] << endl;
cin >> guess;
counter++;
if (counter == 5);
cout << "Sorry I am a frog." << endl;
cout << "Play again? <y> or <n> " << endl;
cin >> choice;
switch (choice)
{
case 'y/Y':
cout << "This is an Animal Guessing Game." << endl;
counter++;
case 'n/N':
cout << "Thank you for playing. Goodbye." << endl;
default:
cout << "Illegal letter, please try again." << endl;
}
}
return 0;
}