[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

C++: Reference til medlemmer i object. *. eller ->



Hej alle,

Jeg har spekuleret over, hvad der mest korrekt i OOP sammenhæng når man
skal referere til et objekts medlemmer; både ud fra en teoretisk/praktisk
tilgang (praktisk=performance/brug af hukommelse).

klasse.medlem (objekt gemmes på stakken)
klasse test;

test.medlem;

klasse->med (objekt oprettes dynamisk i hip)
klasse *test;

klasse test = new klasse();
test->medlem;
delete(test);

Hvad har i af kommentarer/holdninger til ovenstående?

Min egen mening er, at dynamisk er mere i OOP's ånd, og derfor, ud fra en
teoretisk tilgang, bør foretrækkes.

-- 
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *