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 


Inline functions, classes.

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

Joined: 06 Sep 2009
Posts: 131
Location: Greece

PostPosted: Mon Dec 14, 2009 5:45 pm    Post subject: Inline functions, classes. Reply with quote

We are learning about functions declared inside the class and outside the class. Our teacher just says it is a programming style and nothing changes at all. But I've read at cplusplus that when you include the body of the function inside the class, the function is inlined for every object of your class. I didn't know what inline function is, but as I understood, in the executable, when using inline, the program will not use any call to the function block, but will directly execute the code. So if I use many objects and my function is big, that would make copies of the function for every object?, my executable will grow big... isn't that true??

Edit: I don't want to create another thread so, I have 1 more question about classes. For what reason do access specifiers exist? Who are they trying to protect? I couldn't create a program that access specifiers would seem useful to me. Maybe they protect the memory from being written, like setting read only? And if I want to write the private variable?, or it is something like compiler protection against mistakes done by the programmer?
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Mon Dec 14, 2009 7:39 pm    Post subject: Reply with quote

http://en.wikipedia.org/wiki/Inline_function
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