The Cellar  

Go Back   The Cellar > Main > Technology

Technology Computing, programming, science, electronics, telecommunications, etc.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 11-29-2010, 05:51 PM   #27
Happy Monkey
I think this line's mostly filler.
 
Join Date: Jan 2003
Location: DC
Posts: 13,575
It will happen.

I withdrew my predictions from 8 and 13 already.

I don't think you've tested whether the things I've said were supposed to happen in 15, 19, and 25 are happening. They wouldn't affect what you see in your normal execution, just what is happening behind the scenes. As I said, the while loop is correcting for the strange behavior of the functions, and it seems to me that all of the overwhelming evidence you have presented includes the while loop.

If you test the functions alone, not in a while loop, you can see the side effects:

main()
{
cin.getline(pw)
if (a(pw))
cout << "a returned true, pw is now " << pw << endl;
else
cout << "a returned false, pw is now " << pw << endl;
}

If you enter a bad password, it will ask for another. If you enter another one, it will return false, even if the second one was good.
__________________
_________________
|...............| We live in the nick of times.
| Len 17, Wid 3 |
|_______________| [pics]
Happy Monkey is offline   Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 08:39 AM.


Powered by: vBulletin Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.