Sorry for the probably ridiculous and basic question (I haven't programmed in C since I was a teenager, and I'm 39 now...), but with the code below I get the output from the tcc compiler:
test.c:15: warning: assignment makes pointer from integer without a cast
test.c:26: error: lvalue expected
Why is this happening on line 26?
Thanks for your patience, I mainly do web front and back end stuff these days...
----- CODE -----
#include <stdio.h>
// needed for gets() and puts()
char* input() {
char inp[256];
gets(inp);
return inp;
}
void output(outp) {
puts(outp);
}
int main() {
int exe = 1;
char inp[256];
char exit_msg[] = "END OF PROGRAM. THANK YOU!\0";
while(exe) {
inp = input(); // line 26
output(inp);
if (inp == "END"){
exe = 0;
}
}
puts(exit_msg);
return 0;
}