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 


Classes, pointers, arrays into strings

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Chase Payne
Grandmaster Cheater
Reputation: 1

Joined: 20 Mar 2008
Posts: 533

PostPosted: Thu May 20, 2010 9:56 pm    Post subject: Classes, pointers, arrays into strings Reply with quote

What this is, is basically strings *without* using string library.

If you're like me on, maybe perhaps chapter 17 in c++ you should (easily) be able to understand this, or maybe you can try playing around with it yourself to learn how pointers, classes and arrays can work together.

The program is below here:


http://rapidshare.com/files/389798761/Chase_s_Game.exe




Source codes:
http://pastebin.com/zmvVz8y8
^^ The string base

http://pastebin.com/vCMj10yR
^^ main code


No, this isn't something amazing... but I'm sure someone will make use with it.

Edit:: I meant to post this on binaries, move it if you want.
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Thu May 20, 2010 10:03 pm    Post subject: Reply with quote

The code that handles the internal array should be separate from the code that handles the class as an abstraction of the array. i.e. - make a class called 'string'; have that class hold a single string and allow whatever code that makes use of the class to preform operations on said string (and does nothing else).

Your program would then use this class.
Back to top
View user's profile Send private message
Chase Payne
Grandmaster Cheater
Reputation: 1

Joined: 20 Mar 2008
Posts: 533

PostPosted: Thu May 20, 2010 10:12 pm    Post subject: Reply with quote

Flyte wrote:
The code that handles the internal array should be separate from the code that handles the class as an abstraction of the array. i.e. - make a class called 'string'; have that class hold a single string and allow whatever code that makes use of the class to preform operations on said string (and does nothing else).

Your program would then use this class.

I'm not sure what you are implying here, are you saying it's better off having 2 classes? It seems to be working fine with just one.

Would there be any benefit of separating the voids form the class?
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