Trying to use c for the first time in years and blowing out in fgets.
I created this very simple program which still produces the error:
#include <stdio.h>
int main(int argc, char *argv[])
{
FILE *fp1;
char *text1;
fgets(text1,150 ,stdin);
fputs(text1,std out);
return(0);
}
The error is "The instruction at "0x78022901 " referenced memory at
"0x00000003 ". The memory could not be "written"." I get it after
typing in some text and hitting enter.
I'm using gcc.
I created this very simple program which still produces the error:
#include <stdio.h>
int main(int argc, char *argv[])
{
FILE *fp1;
char *text1;
fgets(text1,150 ,stdin);
fputs(text1,std out);
return(0);
}
The error is "The instruction at "0x78022901 " referenced memory at
"0x00000003 ". The memory could not be "written"." I get it after
typing in some text and hitting enter.
I'm using gcc.
Comment