hi,
i have the following code:
#include <iostream>
using namespace std;
class test{
public:: bool t()
{
cout<<"enter your answer(y or n)\n";
int answer = 0;
cin>>answer;
if (answer =='y') return true;
else return false;
}
};
int main(void){
test t;
return t.t;
}
i get this error: cannot convert bool to int......... can anyone help me i am a newbie, the concept is fine i think as i am creating object of the class and calling the method in that class.
thanks