Please have patience with me on this. I just started reading a book about C and it instructed me to type the following:
#include <stdio.h>
void main()
{
char txt[80];
printf("Enter data:");
scanf("%s",txt);
printf(txt);
}
When compiling (gcc) I got 2 messages:
lots of dirs and then about file crt1.o it said "in function '_start':"
and the second line same dirs and about file crt01.a(.txt+0x18)and then the message "undefined reference to main"
as it talks about txt i changed the declaration to 20 (i thought perhaps the line is too long, but the same message keeps apearing.
There is probably a very easy explanation but I just dont know enough yet to find it myself. Anyone please?