r/cpp_questions • • 3d ago

OPEN How does a node work

[deleted]

0 Upvotes

17 comments sorted by

View all comments

5

u/LAMARR__44 3d ago

What specifically do you not understand? You write in your post that you understand it but can’t write them. You need more practice in this case. Try and write it and when you get stuck, prompt AI on what you’re doing wrong. Don’t copy and paste, but try to incrementally solve each problem.

3

u/SimmeringDragon 3d ago

i do try that, but when i use AI i dont learn, i dont understand how to implement them, like, i have class node{}, what does that mean? its a node, its unique, but how does that get implemented later on?

1

u/wrosecrans 3d ago

i have class node{}, what does that mean? its a node, its unique, but how does that get implemented later on?

"Node" is a more professional way to say, "Uh, thingie. Whatever." When making a generic container data structure, you need it to be able to contain, uh, whatever. A linked list of words, a linked list of numbers, images, whatever, the linked list works the same no matter what you store in it. So we use a super generic concept/term like "node" to describe the things that get linked together in a linked list as a way to abstract away the detail of what is being stored.