• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Comments on Linked List code

I've had to write some Linked List code recently and I've managed to get it to compile and the test code seems to work. I was just wondering if anyone has any comments about it or can point out some glaring issues with any of it.

I am quite new to malloc and friends so I want to make sure I've not screwed anything up there.

I've attached the code with a Makefile to this post.


noob questions.

what does it mean when you use:

port2->index = "43";

what does the arrow mean? and why are you using 43 as a string? (inside quotes)
port2 is a pointer so I could use (*port2).index but because this is such a common need the -> method of accessing structure members through pointers is provided.

I am using strings because its all involved with SNMP and OIDs which are easier to work with using strings

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member