Well there's your mistake. The op had a big problem with his conditions earlier, so if I was going to post an answer in code, I would do my best to make sure the conditions worked. Yours don't, so I made a comment.
This is a discussion on Simple program I made - Question about code within the C++ Programming forums, part of the General Programming Boards category; Well there's your mistake. The op had a big problem with his conditions earlier, so if I was going to ...
Well there's your mistake. The op had a big problem with his conditions earlier, so if I was going to post an answer in code, I would do my best to make sure the conditions worked. Yours don't, so I made a comment.
Originally Posted by phantomotap
Or you could refactor away all the junk and just go with:
Code:#include <iostream> int main() { std::cout<<"Megan Fox is the hottest girl!"<<std::endl; }
C++ does not require an explicit return statement from main.
Originally Posted by c++ standard
hmm... I understand that except for the last part where it says:
What is this there for?Code:} while (HottestGirl == 0);
Also, one thing this doesn't do is display "Selection: " before the user inputting the selection. Is there a way to fix this or no? It's not that it's so important, the program means nothing, I am just trying to learn
Last edited by PersianStyle; 07-13-2009 at 01:14 AM.
You need to put effort into getting a book, because loops is one basic thing all programmers must know.
If you don't have one, I would recommend getting Accelerated C++.
This loop simply says: loop WHILE HottestGirl equal 0.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^