Code:
while (choice != 1 && choice != 2)
{
choice = func3(choice);
{
if (choice == 1)
{
func1();
}
else if (choice == 2)
{
func2();
}
}
}
void func3 (int reenter)
{
cout << "Invalid entry. Must enter a 1 or a 2. Re-enter your choice: ";
cin >> reenter;
return reenter;
}
This is like the minimum fix you can do, though there is a simpler/nicer way, but just for you to understand what is happening.
With blue is the correction, with red is code that should be omitted (not used).
When you do cin >> reenter, you put in the variable "reenter" the value of the input.
You need to give that value also on the main program, you can do so by returning is value.
EDIT: Second options is passing by reference, as above, but there is a "*" missing
Code:
void func3(int & reenter )
{
cout << "Invalid entry. Must enter a 1 or a 2. Re-enter your choice: ";
cin >> *reenter;
}