[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: [CPROG] Pointer til void functioner



Mads Bondo Dydensborg wrote:

> On Fri, 30 Mar 2001, Jarl Erik Gjessing wrote:
>
> > Tak for svaret, men det var ikke helt det jeg mente.
> >
> > Jeg har et program, som kan udføre forskællige ting. Functionerne kunne f.eks.
> > hedde:
> > addUser()
> > delUser()
> > modifyUser()
> >
> >
> > En anden function skal uden at vide hvilken af disse tre funtioner som er
> > aktive, kunne koble dem af hvad de gør.
> > Dette med en egen lavet function hedder releaseFunc.
> > Denne kunne så hedde:
> > releaseFunc( addUser(), doIt() );
> > releaseFunc( delUser(), doIt() );
> > releaseFunc( modifyUser(), doIt() );
> >
> > Jeg ville så bare gerne kunne kalde releaseFunc( "pointer to
> > function", doIt() );
>
> Jeg forstår ikke dit problem - du må beskrive det yderligere.
>
> releaseFunc ( addUser(), doIt() );
>
> sender jo netop en peger til addUser til releaseFunc?

releaseFunc er ikke lavet af mig, men en funktion jeg kalder fra et library.

Mit problem er, at jeg i den funktion som skal kalde releaseFunc skal release den
rigtige.
Altså releaseFunc( funktionsnavn, hvad der skal releases ).

Enten skal jeg have en generel pointer som bare peger på den fuktion som er aktiv.
(det kan de være i en længere periode da der laves flere kald til dem) ellers skal
jeg have een releaseFunc for hver funktion der skal releases.

Hvad jeg så ville var, at den kaldte funktion sætter en peger til, at pege på sig
selv, så den anden funktion bare kalder
releasFunk( peger, hvad som skal releases)

Det er lidt svært at forklare, håber dette hjalp


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 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] *