![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |
| |||
| Maybe it has something to do with: PHP Code: PHP Code: Thanks, rpgfan3233 __________________ "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off." -- Bjarne Stroustrup, creator of what is now known as C++ For more quotes by Bjarne Stroustrup, check out http://www.research.att.com/~bs/bs_faq.html#really-say-that. |
| The Following User Says Thank You to rpgfan3233 For This Useful Post: | ||
HelloWorld (07-23-2007) | ||
| ||||
| Thanx rpgfan3233 Yes, that's where the problem starts, it throws me exception if I changed it back to array.length But, array.length should be the same with s.size() though because I created all of them within this for loop: PHP Code: ![]() |
| |||
| Instead of testing against the size of the stack, why not use a while loop and test whether it is empty. I personally think it would be much safer than the for loop, though I honestly still don't see the difference with that code: PHP Code: __________________ "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off." -- Bjarne Stroustrup, creator of what is now known as C++ For more quotes by Bjarne Stroustrup, check out http://www.research.att.com/~bs/bs_faq.html#really-say-that. |
| The Following User Says Thank You to rpgfan3233 For This Useful Post: | ||
HelloWorld (07-24-2007) | ||
![]() |
| Thread Tools | |
| Display Modes | |
| |