[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
newbie C programming question
- From: Christopher Henderson <christopher acme-tech org>
- To: redhat-list redhat com
- Subject: newbie C programming question
- Date: Thu Jan 2 03:19:05 2003
I'm trying to teach myself C and I'm having trouble compiling my first
program. This is following the C Tutorial at
<http://www.physics.drexel.edu/courses/Comp_Phys/General/C_basics/c_tutorial.html>.
My first program, a simple "Hello World", is as follows
#include < stdio.h>
void main()
{
printf("\nHello World\n");
}
I go to a console and type gcc hello.c as stated in the tutorial and get
the following error spit out at me -
hello.c:1:20: stdio.h: No such file or directory
hello.c: In function `main':
hello.c:4: warning: return type of `main' is not `int'
well, I did a whereis on stdio.h and its in /usr/include - any ideas on the
problem? I know this might be a bit off-topic, and btw I'm running RH 8.
Thnx folks,
~Christopher
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]