Comments on Linked List code

Geffy

OSNN Veteran Addict
Joined
18 Mar 2002
Messages
7,805
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.
 

Attachments

  • List Code.zip
    1.4 KB · Views: 70

X-Istence

*
Political Access
Joined
5 Dec 2001
Messages
6,498
It is very simplistic, which is a very good thing. Will look over it some more tomorrow morning (today) when I wake up :D
 

dubstar

format c:
Joined
3 Dec 2002
Messages
1,357
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)
 

Geffy

OSNN Veteran Addict
Joined
18 Mar 2002
Messages
7,805
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 profile posts

Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.
Terrahertz wrote on Electronic Punk's profile.
Yo fellas!
Electronic Punk wrote on Sazar's profile.
Where are you buddy?
Perris Calderon wrote on Electronic Punk's profile.
Hey EP! All good with me, applying for Microsoft MVP right now, should have done this a while ago.

Notifications don't work, I only found your response by coming back to hunt up some threads, if you want, give me your email address so we can keep in touch easier!
Perris Calderon wrote on Electronic Punk's profile.
EP, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there!

Forum statistics

Threads
61,997
Messages
673,411
Members
5,590
Latest member
AntonioPR