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 


Need help with my first short C++ program....

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Thu May 05, 2016 6:17 pm    Post subject: Need help with my first short C++ program.... Reply with quote

Please take a look at the two screenshots.
I want to make a trainer from C++, but I'm having problem with finding the window of the game. I have watched some tutorials and copied the code in the tutorial to Visual Studio. However, an error message kept showing up, which points to the FindWindow function. How to fix it? (I was using the calculator in windows OS for testing purpose.)

Thanks in advance.

Edit:
I uploaded the wrong picture of the error message. Now it's correct.



error.JPG
 Description:
This is the error message.
 Filesize:  33.08 KB
 Viewed:  5474 Time(s)

error.JPG



Capture.JPG
 Description:
This is the code.
 Filesize:  28.73 KB
 Viewed:  5478 Time(s)

Capture.JPG


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

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Thu May 05, 2016 8:35 pm    Post subject: Reply with quote

That compiles just fine for me using cygwin g++. What compiler and options are you using? Are you sure everything is up to date?
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Thu May 05, 2016 9:11 pm    Post subject: Reply with quote

ParkourPenguin wrote:
That compiles just fine for me using cygwin g++. What compiler and options are you using? Are you sure everything is up to date?


I'm really new to programming. I don't know where to check the compiler version in Visual Studio. Sad

What kind of tool are you using? Can I use your tool to make a form application? If so, I will just use yours.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Thu May 05, 2016 10:00 pm    Post subject: Reply with quote

I used notepad to write the c++ source file and cygwin g++ to compile it. I would not recommend writing source code in notepad as there are many free IDEs you could get. The only reason why I did was because it was the fastest thing I could use to test such a small amount of code.

You should take the time to learn about programming in general. Not just the syntax of a specific language, but other things such as how source code is translated to asm. Use google to help learn.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Fri May 06, 2016 12:28 am    Post subject: This post has 1 review(s) Reply with quote

You need to change the character set in Visual Studio's project properties from Unicode to Multibyte.
(Or use Unicode strings.)

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Dr.Disrespect
Grandmaster Cheater
Reputation: 3

Joined: 17 Feb 2016
Posts: 526

PostPosted: Fri May 06, 2016 12:31 am    Post subject: Reply with quote

@Penguin @ atom0s

Thank both of you. Smile
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