i want to concatenate a string to a structure passed in the parameter and return the new structure. and it works if i pass it by reference and use pointers,
for example,
And what I'd like to do isCode:typedef struct { char someString[80]; }someStruct; someStructMore(someStruct); int main { someStruct blah; /*etc assignments to blah*/ someStruct more(someStruct blah); return 0; } someStruct more(someStruct blah); { someStruct value; char aLine[80] = "Heya person."; .... }
strcat(blah.someString, aLine);
strcat(more.someString, blah.someString);
But I get compiling issues. I understand that strcat concatenates a string to a pointer, meaning I can't just use blah.someString or more.someString, so I am now wondering how I'd be able to get around that issue but using something other than strcat(). Any ideas?