我正在浏览这个,但在第114行写的printf("%d -> ", t->value);
是我问的是什么"%d ->意思?这是拼写错误还是其他什么?
例:
struct btnode {
int value;
struct btnode * l;
struct btnode * r;
} * root = NULL, * temp = NULL, * t2, * t1;
void inorder(struct btnode * t) {
if (root == NULL) {
printf("No elements in a tree to display");
return;
}
if (t->l != NULL)
inorder(t->l);
printf("%d -> ", t->value);
if (t->r != NULL)
inorder(t->r);
}
Run Code Online (Sandbox Code Playgroud)
它没什么特别的,只是一个普通的格式字符串.
printf("%d -> ", 42);
Run Code Online (Sandbox Code Playgroud)
输出:
42 ->
Run Code Online (Sandbox Code Playgroud)