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 


C++ help?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
User Error
How do I cheat?
Reputation: 0

Joined: 17 Jan 2009
Posts: 0

PostPosted: Wed Mar 12, 2008 2:53 pm    Post subject: C++ help? Reply with quote

idk where to start

im trying to form a simple hello world.

I have the code


Code:
#include <iostream.h>

main()
{
cout << "Hello CEF!";
return 0;
}




now where and how do i put it in? pics=good.

using visual C++ espress 9.0
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Mar 12, 2008 2:56 pm    Post subject: Reply with quote

New empty project, right click in the solution explorer (top right) and add a .cpp file.

also, int main
also, std::cout


Last edited by hcavolsdsadgadsg on Wed Mar 12, 2008 2:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Wed Mar 12, 2008 2:57 pm    Post subject: Reply with quote

Download Visual C++ 2008.
Install it.
Open it.
Click -> File -> New Project -> Empty Project.
Click -> Project -> Add new file -> C++ File(.cpp)
Copy and paste that code in.
Click Debug -> Start with out debugging.

I notice a little error in your code.
Add this in

Code:
using namespace std;

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Mar 12, 2008 2:59 pm    Post subject: Reply with quote

Along with other errors, its:

#include <iostream>

Without the .h for that said file. And when you do get it to work and ask why it just closes, it is because you did not include a method to pause the console before closing. You can do that via:

Code:
std::cin.ignore();
std::cin.sync();


Before your return.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
User Error
How do I cheat?
Reputation: 0

Joined: 17 Jan 2009
Posts: 0

PostPosted: Wed Mar 12, 2008 3:32 pm    Post subject: Reply with quote

i did this, what is wrong here?


Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Wed Mar 12, 2008 3:37 pm    Post subject: Reply with quote

Code:

#include <iostream>
using namespace std;

int main()
{
cout << "Hello CEF";
cin.ignore();
cin.sync();
return 0;
}


You also spelled hello 'helo'...

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
User Error
How do I cheat?
Reputation: 0

Joined: 17 Jan 2009
Posts: 0

PostPosted: Wed Mar 12, 2008 4:00 pm    Post subject: Reply with quote

HornyAZNBoy wrote:
Code:

#include <iostream>
using namespace std;

int main()
{
cout << "Hello CEF";
cin.ignore();
cin.sync();
return 0;
}


You also spelled hello 'helo'...


I already had a project named hello lol.


so what should i do next?
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Wed Mar 12, 2008 4:15 pm    Post subject: Reply with quote

copy and paste my code int and press F5 to run it.
_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
User Error
How do I cheat?
Reputation: 0

Joined: 17 Jan 2009
Posts: 0

PostPosted: Wed Mar 12, 2008 4:32 pm    Post subject: Reply with quote

HornyAZNBoy wrote:
copy and paste my code int and press F5 to run it.


No, i mean what should i do? Make something else? learn something? My friend told me the first thing to learn to do was "Hello World"
Back to top
View user's profile Send private message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Wed Mar 12, 2008 4:38 pm    Post subject: Reply with quote

Now make a calculator.
_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Mar 12, 2008 5:53 pm    Post subject: Reply with quote

Stop and understand the code that was given to you first.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
User Error
How do I cheat?
Reputation: 0

Joined: 17 Jan 2009
Posts: 0

PostPosted: Wed Mar 12, 2008 6:05 pm    Post subject: Reply with quote

One more thing, how do i save the hello world as a .exe? i debug it and it saves a .exe but when i send it to my other computer and try to use it it doesnt work.

EDIT: Nevermind, got it.
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
Page 1 of 1

 
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