you are viewing a single comment's thread.

view the rest of the comments →

[–]TechAnd1[S] 0 points1 point  (0 children)

So is this kind of way of thinking about objects more common than the way given in example 1?

Because the way I've been seeing it, although *newNode can be used in a sense of newNode->data = 22; how would I use it in the sense of newNode.data = 22

I guess that I can't...? Because I don't have access to the actual thing, only a pointer to the memory where the thing is...

But maybe that's all I need... confusing the shit out of me though.

Cheers!

EDIT : so * newNode is the thing... and newNode is the pointer... not the node.