structs can contain STRINGs. This is no problem.
As to your copy problem:
struct test{
char charArray[5];
};
STRING mySTR;
struct test testCharStruct;
mySTR = str_create("");
testCharStruct.charArray[0]= 't';
testCharStruct.charArray[1]= 'e';
testCharStruct.charArray[2]= 's';
testCharStruct.charArray[3]= 't';
testCharStruct.charArray[4]= '\0'; /*string termination*/
str_cpy(mySTR, testCharStruct.charArray);
printf("%s", mySTR->chars);
untested. Probably won't work because I did some stupid mistake... but I hope you get the idea.
Last edited by Firoball; 06/01/07 17:41.