![]() |
| | #16 |
| Registered User Join Date: Apr 2006 Location: United States
Posts: 3,201
|
__________________ Os iusti meditabitur sapientiam Et lingua eius loquetur indicium "There is nothing either good or bad, but thinking makes it so." (Shakespeare, Hamlet, Act II scene ii) http://www.myspace.com/whiteflags99 |
| whiteflags is offline | |
| | #17 |
| C++0x User Join Date: Nov 2008 Location: Sweden
Posts: 133
| 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;
}
|
| Tux0r is offline | |
| | #18 |
| Banned Join Date: Mar 2009
Posts: 533
| you forgot to return 0
__________________ ╔╗╔══╦╗ ║║║╔╗║║ ║╚╣╚╝║╚╗ ╚═╩══╩═╝ |
| ಠ_ಠ is offline | |
| | #19 |
| Registered User Join Date: Sep 2004 Location: California
Posts: 2,845
| |
| bithub is offline | |
| | #20 |
| Banned Join Date: Mar 2009
Posts: 533
|
__________________ ╔╗╔══╦╗ ║║║╔╗║║ ║╚╣╚╝║╚╗ ╚═╩══╩═╝ |
| ಠ_ಠ is offline | |
| | #21 | |
| Registered User Join Date: Sep 2004 Location: California
Posts: 2,845
| C++ does not require an explicit return statement from main. Quote:
| |
| bithub is offline | |
| | #22 | |
| Registered User Join Date: Jul 2009
Posts: 20
| Quote:
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. | |
| PersianStyle is offline | |
| | #23 | |
| Mysterious C++ User Join Date: Oct 2007
Posts: 14,099
| 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.
__________________ Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System I dedicated my life to helping others. This is only a small sample of what they said: "Thanks Elysia. You're a programming master! How the hell do you know every thing?" Quoted... at least once. Quote:
| |
| Elysia is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I need help to compile this code... | wise_ron | C Programming | 17 | 05-07-2006 12:22 PM |
| Random Question Assign Program | mikeprogram | C++ Programming | 6 | 11-17-2005 10:04 PM |
| Simple question about pausing program | Noid | C Programming | 14 | 04-02-2005 09:46 AM |
| Can someone help me understand this example program | Guti14 | C Programming | 6 | 09-06-2004 12:19 PM |
| Have You Got A program To Match Question. | Unregistered | C Programming | 10 | 06-01-2002 03:50 PM |