![]() |
Program won't execute
I am using the Stephen G. Kochan C textbook. A sample program is troublng with executing. Here's the code.
Code:
#include <stdio.h> |
Re: Program won't execute
This is output layout. Correct only . What you want?
Code:
asadulla ~/test> g++ temp7.cpp |
Re: Program won't execute
This is meant to be a C and not a C++ program. I am using GCC. But stdio.h is C library, not C++, wonder how you compiled it under G++.
|
Re: Program won't execute
Quote:
Code:
|
Re: Program won't execute
I have retried under Ubuntu and CRUX Linux. Same output:
Code:
root@toshiba:~# gcc 7_2.cCode:
root@toshiba:~# gcc -v |
Re: Program won't execute
By the way, which shell are you using? BASH or SH?
|
Re: Program won't execute
I am using sun-solaris system
|
Re: Program won't execute
Yep, fine, GCC 3 compiles and runs it smoothly. Thanks for letting me know that there's no bug in code. I think I shan't install GCC 4 until the stable release. Both my CRUX and Ubuntu use 4 and I have installed 3.4 on Ubuntu machine.
|
| All times are GMT +5.5. The time now is 03:04. |