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 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Sat Aug 11, 2007 11:03 am    Post subject: [HELP] C++ Hello World Program Reply with quote

I'm using Dev-C++ as my complier and when I try a simple Hello World program, I keep getting an error. Tell me what I'm doing wrong.

Code:
#include <iostream>

using namespace std;

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


I keep getting this error

Code:
[Resource error] no resources

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Sat Aug 11, 2007 11:19 am    Post subject: Reply with quote

I dont know C++, but I dun the Hello World tut and I remember that there is somehting with cin.get.

and I googled for it.
Thats it:
Code:
    #include<iostream>
    using namespace std;

    int main()
    {
      cout<<"Hello World\n";
      cin.get();
    }
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Sat Aug 11, 2007 11:25 am    Post subject: Reply with quote

I'm sure \n is for line break. And when I started to learn C++ (yesterday) I was reading a book that says you don't need the cin.get();. The book I read is called C++ for the Absolute Beginner.
_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
magicalimp
Expert Cheater
Reputation: 0

Joined: 03 Dec 2006
Posts: 105

PostPosted: Sat Aug 11, 2007 1:27 pm    Post subject: Reply with quote

There's nothing wrong with your coding. Something may be off with your installation.
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Sat Aug 11, 2007 1:57 pm    Post subject: Reply with quote

Then can you tell me which compiler I should use.

EDIT

There isn't a lot of people here.

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
TheSorc3r3r
I post too much
Reputation: 0

Joined: 06 Sep 2006
Posts: 2404

PostPosted: Sat Aug 11, 2007 2:02 pm    Post subject: Reply with quote

MVC++
_________________


Don't laugh, I'm still learning photoshop!
Back to top
View user's profile Send private message
merkark12
Advanced Cheater
Reputation: 0

Joined: 04 Jul 2007
Posts: 74
Location: In that program you just downloaded

PostPosted: Sat Aug 11, 2007 2:46 pm    Post subject: Reply with quote

[color=yellow]Yea use Visual c++ and instead of Dev
Code:
#include <iostream>

using namespace std;

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

take out the void but keep the ()
Edit:forgot instead of Dev

_________________


Back to top
View user's profile Send private message
suprat
Cheater
Reputation: 0

Joined: 14 Jul 2007
Posts: 40

PostPosted: Sat Aug 11, 2007 2:56 pm    Post subject: reinstall dev, and use c++ for dummies Reply with quote

i have dev c++, and i have c++ for dummies book, i have tried ur code and it worked well.

and here is a better code :

#include <iostream>

using namespace std;
int main()
{
cout << "Hello Fuckers!!!!!!!!!! " << endl;
system("pause"); ///to stop the program from closing by it self
return 0;
}

enjoy
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sat Aug 11, 2007 4:24 pm    Post subject: Reply with quote

cin.get(); just stops the program from closing itself until u press any key

same goes for system("pause") as stated.

Forget Dev C++, it sux ass.

just get Visual C++ 2005 Express Edition or Download Visual Studio 2005 Proffessional from a Warez Forum.

and yes, \n is new line

most used of those:

\n - New Line
\t - Tab
\b - Backspace
\? - Question Mark
\' - Single Quote
\" - Double Quote

theres a couple more. but u hardly use them.

and when you put int main() instead of int main(void) theres no difference, when u leave brackets blank it automaticcly substitutes it for void no matter what u do, u just dont see it.

_________________
Back to top
View user's profile Send private message
gamesguru
Grandmaster Cheater
Reputation: 0

Joined: 22 Mar 2006
Posts: 926
Location: detroit

PostPosted: Sat Aug 11, 2007 5:28 pm    Post subject: Reply with quote

Console::WriteLine(string Text);?
_________________
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sat Aug 11, 2007 5:29 pm    Post subject: Reply with quote

gamesguru wrote:
Console::WriteLine(string Text);?


thats a Console Application, not a Empty CLR Project.

_________________
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Sat Aug 11, 2007 6:08 pm    Post subject: Reply with quote

Im no expert, but try this:

Code:

#include <io.h>

main()
{
     printf('Hello Screen');
     return 0;
}


C.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sat Aug 11, 2007 6:23 pm    Post subject: Reply with quote

hes trying to learn C++, not C basics....
_________________
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Sat Aug 11, 2007 6:47 pm    Post subject: Reply with quote

That code is fine, it's your compiler. Get a new one like Microsofts.
Back to top
View user's profile Send private message MSN Messenger
magicalimp
Expert Cheater
Reputation: 0

Joined: 03 Dec 2006
Posts: 105

PostPosted: Sat Aug 11, 2007 9:43 pm    Post subject: Reply with quote

Kaspersky wrote:
Im no expert, but try this:

Code:

#include <io.h>

main()
{
     printf('Hello Screen');
     return 0;
}


C.


stdio.h ?
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 1, 2  Next
Page 1 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