c assign function pointer to variable -


i have 2 functions,

//virdomain struct int virdomaincreate(virdomain*); int virdomaindestroy(virdomain*); 

how assign these 2 functions variable?

i tried,

int (*func)(virdomain*) = null; func = virdomaincreate(virdomain*); // not working func = &virdomaindestroy(virdomain*); //not working 

thanks help! waka.

you can assign pointer function like:

func = &virdomaincreate; 

or can use short format:

func = virdomaincreate; 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -