What is the wrong here
I have made a class and when i call one of memebers in swich case
give me this error
lvalue required as left operand of assignment
switch (playerlocation)
{
case 1:
boarddetails.getcname()="Egypt";
countryprice=300;
cout<<"you are in "<<boarddetails.getcname()<<endl<<"Price: "<<boarddetails.getcprice()<<endl;
choose: cout<<"do you want to buy it (y/n) \n";
cin>>c;
if (c=='y')
{
playerinformation.getmoney()=(money-countryprice);
}
elseif (c=='n')
{
cout<<"you will roll again \n";
goto roll;
}
else
{
cout<<"Error!! please choose from y for yes and n for no \n";
goto choose;
}
break;