Thanks much for all the help... like I said - been years and now re-learning. I'm used to perl and php where I can do simple assignments and not worry so much with reference to, address, pointers,...
Type: Posts; User: snowolfe
Thanks much for all the help... like I said - been years and now re-learning. I'm used to perl and php where I can do simple assignments and not worry so much with reference to, address, pointers,...
instead of return name i'm thinking two different possibilities
return strdup(name)
or
add in
char *ret;
ret=(char *)malloc(sizeof(name));
Just doing the literals for working with it - actually are already char *'s in the function that will be calling the add/delete/find.
Was not actually concerned with anything changing. Basically I...
Ok - how's this look?
(Seems to work the way I need it)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct ts{
Well yes an no, kinda.
I'm watching the packets (all of them). Now packets destined for a certain ports are the ones that I'm after. In a simple case let's say IM.
What I have working so far......
Currently looking into linked list.
Let me see if I can explain better what's happening, and what exactly I'm trying to achieve.
I have a loop that is hit on each packet coming in over...
was going for dynamic allotment
at first I was approaching this whole thing with a multidimensional char *
such as char *people[][3];
This is where I got into a rut and turned to the struct....
OK - please be patient for long winded explanation - I assume this is something just completely stupid on my part, because it's been (several) years since working in c. I have a couple of weird...