c语言函数指针

c语言函数指针
 1 void PrePrintOrTree(struct TreeNode* root, void (*WorkPrint)(double)){
 2     struct TreeNode* index = root;
 3     if (root == NULL){
 4         return;
 5     }
 6     PrePrintOrTree(root->lchild,WorkPrint);
 7     (*WorkPrint)(root->value);
 8     PrePrintOrTree(root->rchild,WorkPrint);
 9 }
10 void WorkPrint(double value){
11     printf("%.3f ",value);
12 }
c语言函数指针

 

c语言函数指针,布布扣,bubuko.com

c语言函数指针

上一篇:SpringMVC---400错误The request sent by the client was syntactically incorrect ()


下一篇:用java模拟发送post请求