Re: Hello World doesn't work
On Fri, 27 Nov 1998, Kent West wrote:
> Hey all!
>
> I've decided to get my feet wet with C programming on Linux. I've got two
> machines running Debian (hamm). On both, I've created a simple C
> program (named "bub.c") like so:
You need to #include<stdio.h>
man 3 printf will show you this.
> main()
this should really be int main(void) - C90 will make it invalid to assume
an int return type
> {
> printf("Howdy, World!\n");
return 0;
main returns int ;-)
> }
>
> and compiled it with:
> gcc -o bub bub.c
try -Wall -pedantic -ansi as well, this would probably point these things
out.
HTH,
Matthew
--
Elen sila lumenn' omentielvo
Steward of the Cambridge Tolkien Society
Selwyn College Computer Support
http://www.geocities.com/Area51/Chamber/8841/
http://www.cam.ac.uk/CambUniv/Societies/tolkien/
http://pick.sel.cam.ac.uk/
Reply to: