Thanks in advance for any help. I'm making a simple program in C and I've already declared two strings called: "message1" & "message2", how would I go about changing the contents of these strings? I initially fill them with "empty" for the check that happens in the segment of code shown below:
char message1[32] = "empty";
…
if(message1 != "empty");
{
printf("\n[USER 1]: %s", message1);
message1 = "empty";
}
After this check, if message1
contains anything but the original value, it will then print said value and then reset message1
to its original value of "empty"
. However, this is obviously not the case. I've Googled for the answer and am very confused.