On Mon, 31 Dec 2001, Pen Gwynne wrote:
Eric,
Please do gcc -v or cc -v and tell us what it says. I have the following
4 line program:
int main()
{
printf(Hello World!);
}
- snip --
Now let me say this. My prompt is the normal, or
What warnings are you getting?
Anyway, you need to add a return value unless you change to function from
int main() to void main(). void main() is considered to be bad
programming though. Add return 0; as your last line in the main()
function. That will return the integer value of 0 (zero) to
Eric,
Please do gcc -v or cc -v and tell us what it says. I have the following
4 line program:
int main()
{
printf(Hello World!);
}
It compiles and run properly, even without the normal #include files. I am
using a straight Mandrake 8.1 installation
Dear Pen:
I tried your 4 lines program, it still not print out even I use gcc -v
or cc -v to compile, actually after the gcc -v I got a lot of junks
waring.
Same thing, at bash it is not be printed, but it can be shown at csh.
rpm -q gcc
2.96-0.48mdk (probably straight from 8.0 standard
eric wrote:
Dear mandrake 8.0 standard user:
I used simple c program hello world, in printf(hello world)
it did not print at all,
until I add \n\n at the end of the line of hello world, then it print as
what it should be.
but that kind of result is not correct. it never happen at redhat 7.1
Dear tester:
Thanks your fast replay, but whether put \n or not put \n at string
will violate the c syntax so it wont print in printf still worth to
discuss-I will check my c programming book later to discuss with our
community. /* I actually download and install many new gcc and its
related
Dear mandrake 8.0 standard user:
I used simple c program hello world, in printf(hello world)
it did not print at all,
until I add \n\n at the end of the line of hello world, then it print as
what it should be.
but that kind of result is not correct. it never happen at redhat 7.1
or