[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
 

Re: [PROGRAMMERING] array af funktioner, initialisering og kald af dem.



Mads Bondo Dydensborg wrote:

>Jeg tror iøvrigt du er igang med at lave et design der ikke passer særligt 
>godt til C++, når du er ude i sådan noget.
>  
>
Det er jeg enig i. Derfor foreslog jeg brugen af arv og polymorfi.
Faktisk kan jeg se at jeg lavede en fejl i min kode:

class Decoder {
    virtual int decode(char * p, char * t);
};

...burde have været:

class Decoder {
    virtual int decode(char * p, char * t) = 0;//Pure virtual
};


Så kan du arve fra Decode klassen og implementere 'decode' metoden. Det
svarer lidt til at lave funktioner med samme signatur, som du ville have
gjort, men er noget mere objekt orienteret og C++ venligt.


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2007-03-01, 02:01 CET [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] *