+ 2

What does struct node* means

question of c

9th Oct 2017, 2:09 PM
Akash papnai
Akash papnai - avatar
3 odpowiedzi
+ 10
struct node * , is a pointer to an element of a structure node. It basically stores the address of any variable of type 'node' ( A custom structure ). You must also have a structure like this in your program: struct node { int info; struct node* next; }; Using struct is necessary before node* to comply with C syntax. It is like this how its defined.
9th Oct 2017, 2:16 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 6
struct { unsigned int var1; char* var2; } node; A variable mynode of type node can be defined as node mynode; but if u want to create a pointer which store whole struct address then it like struct node* here struct used to define a variable and node* is a pointer which holds node address hope u understand ☺
9th Oct 2017, 2:15 PM
Scooby
Scooby - avatar
+ 4
Trees huh? That is intermediate C++. learn to use structs, classes and pointers befre starting trees.
9th Oct 2017, 6:22 PM
Manual
Manual - avatar