hello.c - now what?
I am just trying to print a simple "Hello, world!" but it won't work. Here is the content of hello.c
Code:
main() Also, if I add the \a, is the computer supposed to beep? Code:
main() |
Code:
#include <stdio.h> Quote:
|
Try:
Code:
#include <stdio.h> This should make a binary called hello. Without the "-o" flag it will only make assembler output (a.out) and no binary. You can run a.out like any other binary. I never bothered trying that. vxc |
you can use
make hello Code:
billym.primadtpdev>make hello (no you don't need a makefile) |
Great! Adding the #include <stdio.h> did the trick! I can print Hello, world now!
|
Even if you don't add #include <stdio.h> you receive at most a warning like this one:
Code:
implicit declaration of printf |
Quote:
|
I think these two books are enough :p
Kernighan & Ritchie - C Programming Language Stephen Prata - C Primer Plus (5th Edition) ( a ***** book :) ) |
All times are GMT -5. The time now is 08:42 PM. |