Name: Gvaz 2009-01-19 21:57
so I'm having problems with my first program in ANSI C (I'm using Cygwin)
So this is the contents of my "chall3.h" file:
#include <stdio.h>
main()
{
printf("Joe Shmoe\n");
}
And then in the shell, I type:
gcc chall3.h
And then when I try to do:
./chall3.h
I get the following error:
./chall3.h: line 4: syntax error near unexpected token '"Joe Shmoe\n"'
./chall3.h: line 4: 'printf("Joe Shmoe\n");'
Doing "mv chall3.h chall3.c" and repeating the whole deal with chall3.c instead of chall3.h changed nothing.
Any help would be greatly appreciated.
So this is the contents of my "chall3.h" file:
#include <stdio.h>
main()
{
printf("Joe Shmoe\n");
}
And then in the shell, I type:
gcc chall3.h
And then when I try to do:
./chall3.h
I get the following error:
./chall3.h: line 4: syntax error near unexpected token '"Joe Shmoe\n"'
./chall3.h: line 4: 'printf("Joe Shmoe\n");'
Doing "mv chall3.h chall3.c" and repeating the whole deal with chall3.c instead of chall3.h changed nothing.
Any help would be greatly appreciated.