Using a function of type bool as a condition for while loop

I get error (C++ forbids comparison between pointer and integer) when i used a bool function as the condition in a while loop. Can someone please help me.
The code looks something like this.

bool again()
{
char answer;
cout << "Enter y to try again: ";
cin >> answer;
return (answer == 'Y' || answer == 'y');

}

do
{
}while(again==true) // This line of code is the problem.

Thanks in advance!


Like this.
1
2
do {
} while ( again() )
Topic archived. No new replies allowed.