milov.nl

Interaction design • webdevelopment • web art • photography

milov.nl : forum : whatever : 'c++ prob'

c++ prob 98392-278, 031011 00:13
when i put in

if((p2==1 && (card1='q'||card1='Q')) ||
(p2==2 && (card2='q'||card2='Q')) ||
(p2==3 && (card3='q'||card3='Q')) )
{cout<<"\n Urg, You Got It";}
else if((p2==1 && (card1='j'||card1='J')) ||
(p2==2 && (card2='j'||card2='J')) ||
(p2==3 && (card3='j'||card3='J')) )
{cout<<"\n Ha, You Got It Wrong!";}
else
{cout<<"\n What Are You Doing?";}
 
i get an error saying "non-lvalue in" on almost every line. all the variables are declared as integers or characters correctly. i just dont know what the "non-lvalue in" means
HELP!!!!!!!
SATELLITE-PRO-1.msns.mtp.ptd.net
Re: c++ prob 98392-278, 031011 00:14
it looks sloppy here, but its more allined on Dev-Cpp from http://www.bloodshed.net
SATELLITE-PRO-1.msns.mtp.ptd.net
Re: c++ prob 98392-278, 031011 00:15
i must have copy and pasted it without alining it
SATELLITE-PRO-1.msns.mtp.ptd.net
Re: c++ prob 98392-278, 031012 00:24
nevermind ... stupid little mistake i made.
i used assigned (=) instead of eqaul to (==)
SATELLITE-PRO-1.msns.mtp.ptd.net
Pages: 1