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.
Printable View
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.
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.
Quote:
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
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.