-3

The type of left and right is node* so like other types they should be declared as node* left,right; Example int a,b;

tejal567
  • 109
  • 1
  • 11

2 Answers2

1

You have to pick one way or the other, and this way is less awful. For an example of how awful the other way would be, compare:

int a[10], b[20], c[30];

to

int[10] a;
int[20] b;
int[30] c;
David Schwartz
  • 179,497
  • 17
  • 214
  • 278
0

When programming in C, if you get in the habit of attaching the * to the variable names it will make more sense to you.

int *i,j;

i is an int* and j is an int.

cleblanc
  • 3,678
  • 1
  • 13
  • 16