+ 2
What does struct node* means
question of c
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.
+ 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 ☺
+ 4
Trees huh?
That is intermediate C++.
learn to use structs, classes and pointers befre starting trees.