本文介绍了如何在函数参数中将结构指针变量设置为默认值NULL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
struct queue{
int value;
struct queue *tlink;
struct queue *blink;
};
typedef struct queue* Q;
void enqueue(Q top, int val, Q bottom=NULL);
错误:
error:
expected ‘;’, ‘,’ or ‘)’ before ‘=’ token
void enqueue(Q top, int val, Q bottom=NULL);
我尝试过的事情:
我正在尝试将结构指针变量初始化为函数参数中的默认值NULL. (默认参数)
What I have tried:
I am trying to initialise a structure pointer variable to default value NULL in function parameter. (Default parameter)
推荐答案
这篇关于如何在函数参数中将结构指针变量设置为默认值NULL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!