Re: [newbie] c compiler and its problem in 8.0

2002-01-01 Thread Len Lawrence
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

Re: [newbie] c compiler and its problem in 8.0

2002-01-01 Thread Lee Roberts
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

Re: [newbie] c compiler and its problem in 8.0

2001-12-31 Thread Pen Gwynne
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

Re: [newbie] c compiler and its problem in 8.0

2001-12-31 Thread eric
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

Re: [newbie] c compiler and its problem in 8.0

2001-12-29 Thread tester
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

Re: [newbie] c compiler and its problem in 8.0

2001-12-29 Thread eric
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

[newbie] c compiler and its problem in 8.0

2001-12-28 Thread eric
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