Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/25/02 14:13
Read: times


 
#33122 - RE: C++ style in C/ Erik
"C++ protects data by encapsulation, for example if you define int ii inside a class this integer is only seen by the class members and non existance to the outside world, it can only be accessed by a member function."

The same is done in 'C' by making your variables local to the smallest possible scope.
This also helps an 8051 compiler like Keil's, as it gives more oportunity for overlaying.

You can provide functions in 'C' to access those locals - but, of course, that introduces an overhead.
As ever, it's a tradeoff: runtime performance against maintainability, in this case.

List of 24 messages in thread
TopicAuthorDate
C++ style in C            01/01/70 00:00      
RE: C++ style in C            01/01/70 00:00      
RE: C++ style in C            01/01/70 00:00      
RE: C++ style in C            01/01/70 00:00      
RE: C++ style in C            01/01/70 00:00      
RE: C++ style in C            01/01/70 00:00      
RE: C++ style in C. mahmood            01/01/70 00:00      
RE: C++ style in C/ Erik            01/01/70 00:00      
RE: C++ style in C. mahmood            01/01/70 00:00      
RE: C++ style in C. mahmood            01/01/70 00:00      
RE: C++ style in C. mahmood            01/01/70 00:00      
RE: C++ style in C/ Erik            01/01/70 00:00      
RE: C++ style in C. mahmood            01/01/70 00:00      
RE: C++ style in C. mahmood            01/01/70 00:00      
RE: C++ style in C. mahmood            01/01/70 00:00      
RE: C++ style in C. mahmood            01/01/70 00:00      
RE: C++ style in C. //Judy / Erik            01/01/70 00:00      
RE: C++ style in C. mahmood            01/01/70 00:00      
RE: C++ style in C. Erik            01/01/70 00:00      
RE: local global???!!!?!?!?!            01/01/70 00:00      
RE: local global???!!!?!?!?!            01/01/70 00:00      
RE: local global???!!!?!?!?!            01/01/70 00:00      
RE: C++ style in C            01/01/70 00:00      
RE: C++ style in C. mahmood            01/01/70 00:00      

Back to Subject List