[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



Hej C-prog.

On Fri, 30 Mar 2001, Jarl Erik Gjessing wrote:

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

Det er meget muligt at jeg ogsaa misforstaar dig, men for mig
lyder det som om at du skal kigge paa kapitel 5.11 i
Kernighan & Ritchie (Second edition). 
I eksemplet i kapitlet har de skrevet
en sorteringsrutine, som sorter numerisk hvis -n
var specificeret paa "command line" ellers sorteres
efter alfabetisk vis. Funktionen (numerisk eller string)
bliver sendt ind v.h.a. en pointer.

Haaber det var noget i den stil som du ledte efter.


M.v.h.

Kasper.

P.S. Hvis du ikke kan faa fat i K&R kan jeg godt lave et eksempel
til dig, men ellers er jeg for doven denne fredag eftermiddag
til at taste noget ind :)


--
Kasper Hald
Ph.D.-student in Theoretical Chemistry
Email: sslug@sslug
For further information : http://www.kemi.aau.dk/~khald



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