But when I ran this program:
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc,char **argv)
{
char buf[128]
for(;;)
{
gets(buf); //wrong code, I know, but I entered only the letter 'L'
if(!strcmp(buf,"exit\n"))
exit(1);
else
printf("...\n");
}
}
This code worked fine when I used linux's gcc.
So, I was wondering if anyone else had this problem,and/ / or how I could fix it.
Thank!