0

Why in the code below, node declared as datatype?

I learning data structures that provide by community in this app. When I learning about Linked List and see the code example in C++, I really confused because I only know basic programming. At this part, I really2 don't get why node declared as data type. Thanks for the help and sorry for my poor english https://code.sololearn.com/cW7MvH6278Bx/?ref=app https://code.sololearn.com/cW7MvH6278Bx/?ref=app

6th Sep 2021, 8:47 AM
johannes lumbantoruan
johannes lumbantoruan - avatar
2 Answers
+ 2
Because you are creating a pointer of node type
6th Sep 2021, 8:49 AM
Abhay
Abhay - avatar
+ 1
Because you introduced class `node` at line 4. A class is a user defined type.
6th Sep 2021, 9:05 AM
Ipang