LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ListGetPtrToItem not working as expected?

This is a simple but a bit messy bit of code so forgive me...
 
I've got a list of a custom data structure and I'm trying to access those structures and write strings into them.  ints go in just fine, but when I get to strings it's not playing nice, so either it's a string management issue or an abuse of ListGetPtrToItem.  Code spam follows at the link below: 2 files.
 
 
Lines to note:
         CVIXMLGetElementTag(attribs_elem, fieldname);
         fetch(x)->fields[y].fieldname = (char *)fieldname;
         CVIXMLGetElementValue(attribs_elem, fieldvalue);
         fetch(x)->fields[y].fieldvalue = (char *)fieldvalue;
these lines are where it should be dumping in the data and it's not... this issue could be due to using char[300] and char*... will I need to futz about with malloc to get this working right?
 
 
 
0 Kudos
Message 1 of 2
(2,976 Views)
I'll come back when I'm not retarted.... disregard.
0 Kudos
Message 2 of 2
(2,963 Views)