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 


class and struct

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

Joined: 08 Jul 2007
Posts: 8

PostPosted: Sun Jul 08, 2007 8:12 pm    Post subject: class and struct Reply with quote

i don't get why people still use struct instead of class.

class(..){
statements
}
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sun Jul 08, 2007 8:24 pm    Post subject: Reply with quote

1. Some languages don't support classes (C)
2. Classes's members are private by default, struct's are public.
3. You only need a class instead of a struct if you want functions inside.
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sun Jul 08, 2007 8:34 pm    Post subject: Reply with quote

appalsap wrote:
3. You only need a class instead of a struct if you want functions inside.


Which is superfluous and only for organizational purposes as far as I can see.
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