[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] Pointere til funktioner i klassen (C++)







Peter Maersk-Moller <sslug@sslug> wrote on 25-07-2004 23:08:22:

> void CVideoFilter::turn_on_accels(void) {
>    if (et-eller-andet)
>        calc_SAD    = &CVideoFilter::calc_SAD_noaccel;
> }
> --------------------------------------------------------------------
>
> og et andet sted har jeg så
>
> --------------------------------------------------------------------
> void CVideoFilter::mb_search_44 (uint16_t x, uint16_t y)
> {
>     ....
>    SAD = calc_SAD ( m_denoiser.frame.sub4ref[Yy]+MB_ref_offset,
>                     m_denoiser.frame.sub4avg[Yy]+MB_ref_offset );
> --------------------------------------------------------------------
>
> men compileren siger så
>
> line 42: must use .* or ->* to call pointer-to-member function in
> `CVideoFilter::calc_SAD (...)'
>
> Øhh ! Hvad går der galt her ?
>
> I den kode jeg *sakser fra* (transcode - filter yuv-denoiser) går det
ellers
> fint nok, men der er koden C (og ikk C++) og der bruges ikke klasser
> men statiske og globale funktioner/variable, men det burde da ikke
> være så svært med klasser, eller gør jeg det bare forkert ?

Der ville ikke være noget galt med
>        calc_SAD    = &CVideoFilter::calc_SAD_noaccel;
hvis calc_SAD_noaccel havde været en function der var erklæret static

Og så giver det lige pludselig god mening -- og for øvrigt tak for
diskussionen!!


Med venlig hilsen

Nils Åke Ljunggren


This e-mail may contain confidential information and is intended only for
the addressee. If you have received this e-mail by mistake, please notify
the sender and delete this mail.
(*They* make me write this).


 
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] *