Question: I have two tables:

Parts
 part\_no nchar(15)

Models\_Parts
 model\_no nchar(10)
 part\_no nchar(15)

Models\_Parts has 35,000+ entries. Parts has 1800 entries with no corresponding entry in Models\_Parts. I need to create those entries with the model\_no 'NO MODEL'. I am currently identifying those 1800 entries with:

```
SELECT    DISTINCT  p.part_no
  FROM  dbo.parts   AS  p
  WHERE p.part_no NOT IN
    (
    SELECT  mp.part_no
    FROM    models_parts        AS  mp
    )

```

Is there a quick and easy way to make those entries? Performance is no an issue.

Answer: 
This:

```
sizeof(user_info*)

```

should be this:

```
sizeof(user_info)

```

You want the size of the struct itself, not the size of a pointer to it. Right now, your `memcpy()` call is not copying all the data as a result.

Similarly, `listNode *node = malloc(sizeof(listNode))` should probably be `listNode *node = malloc(sizeof(*node))` for the same reason. I'm assuming `node->data = malloc(list->elementSize);` will be correct once you're passing the right size to `list_new()`.
What is the list->elementSize set to?

Another potential issue:

You're storing pointers to the memory where the strings are.
Suppose you parse a character string then store a pointer.
Later if the string is deallocated the pointer will be aimed at whatever gets placed there later. It will be very difficult to debug. Make sure your strings remain during the time you use your list.