I want to create a string using strcat, problem is it will contain the ampersand character. How do you handle special characters like this using the string manipulation functions?
Here is my code that is failing on the last line with a memory access violation (I think because & is used in de-referencing pointers):
if (count > 0){//create string to accept AGs
s1= "AcceptStatus0=Y";
lr_output_message("s1 is: %s", s1);
s2 = "&AcceptStatus";
lr_output_message("s2 is: %s", s2);//OK so far
strcat(s1,s2);//fails here
}
Here is my code that is failing on the last line with a memory access violation (I think because & is used in de-referencing pointers):
if (count > 0){//create string to accept AGs
s1= "AcceptStatus0=Y";
lr_output_message("s1 is: %s", s1);
s2 = "&AcceptStatus";
lr_output_message("s2 is: %s", s2);//OK so far
strcat(s1,s2);//fails here
}