Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ANSI C question

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.

Name: Anonymous 2009-01-20 0:56

>>7
Now you have 1.9 problems

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List