Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[HELP] C++ Hello World Program
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Skyone
Grandmaster Cheater
Reputation: 0

Joined: 10 Sep 2006
Posts: 508

PostPosted: Sun Aug 12, 2007 1:31 pm    Post subject: Reply with quote

???

Last edited by Skyone on Wed Dec 23, 2009 9:08 am; edited 7 times in total
Back to top
View user's profile Send private message AIM Address MSN Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Aug 12, 2007 2:57 pm    Post subject: Reply with quote

Just take out the void. So it should look like this.

Code:

#include <iostream>

using namespace std;

int main()
{
   cout<<"Hello World!\n";
   return 0;
}


The \n is optional as that only makes a new line. If you want you can declare main as void by doing void main() and put cin.get(). It has the same effect as a return 0.

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
DeltaFlyer
Grandmaster Cheater
Reputation: 0

Joined: 22 Jul 2006
Posts: 666

PostPosted: Sun Aug 12, 2007 3:49 pm    Post subject: Reply with quote

oib111 wrote:
If you want you can declare main as void by doing void main() and put cin.get(). It has the same effect as a return 0.


You couldn't be more wrong. cin.get reads a character from keyboard input; return 0 exits the function and returns a 0 to the caller. The 0 in this case symbolizes that everything went fine.

Completely different.

_________________

Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites