Pointer array of functions

xiaoxiao2021-03-06  75

Void INPUT;

Void Output (st *);

Void bubble (st *);

Void Find (st *);

Void Failure (ST *);

/ * Function declaration: These five functions are pointed to the ST type (prior defined) structure as a parameter, no return value. * /

Void

(* Process [5]) (st *) = {INPUT, OUTPUT, BUBBLE, FIND, FAILURE};

/ * Process provides five functions of different functions (pointing to the pointer array of functions) * /

PRINTF

"/ nchoose: / n?");

Scanf

"% d", & choice);

IF (choice> = 0 && choice <= 4)

(* process [

Choice]) (a);

/ * Call the corresponding function to achieve different functions *; /

转载请注明原文地址:https://www.9cbs.com/read-120805.html

New Post(0)