my equals sign is broken, or something


[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]

Posted by glick on November 14, 2001 at 13:54:44:

haha, ok, well not quite, but maybe. either way, this is no lauging matter. im trying to compare the license plate elements of the array to the inputed search license plate (named plato).

i made a loop, going through all the elements of the array, comparing them to plato, and if they matched, i would write to the log, simple. nope, my program says they never match, not one of them. after several attempts, here is some simple code and output from that code that just plain does not make sense.


code:

cout << plato;
cout <<"\t";
cout << license[42];
cout <<"\n";

if (license[42] == plato){
cout << "boooya!";
}


and the output from that code is:

HNX 4261 HNX 4261
ABC 1726 HNX 4261
RIV 4399 HNX 4261
CRD 8296 HNX 4261
Press any key to continue


can anyone explain why i dont get a "booya" after the first comparison where hnx 4261 is compared with hnx 4261?? your help and time are greatly appreciated. maybe i just need a new keyboard with a non broken = sign or something




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]