Originally Posted by
joeprogrammer
You still haven't initalized temp2.
By the way, here's what I think it should look like:
temp2 = -99;
while (number != SENTINEL)
{ // open while 3
counter++;
cin >> number;
if (number == -99) {
break;
}
if (number < temp2 || temp2 == -99)
temp2 = number;
}
Probably not the best way of doing it, but it works.
Hey! that works! I had something very similar to that at one time, but I had temp2 != -99.... I turned your code into this and it failed. Turned it back and it worked... that one little ! symbol. geez!
Thanks guys! I appreciate the assistance!
Last edited by mcweezle; Nov 13th, 2006 at 1:25 am. Reason: giving thanks