g++ problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 1 Apr 2004, Sean McMahon wrote:

> Maybe I no nothing here but for such a simple program why don't you use the
> stdio.h with a printf statement.  and why not just make main void?

He could do the former, in order to test the compiler, but since it is C,
and not C++, it would not be of much use, other than experience.
As to the second point: that is invalid code.  Yes, it works, but it
shouldn't.  Main is supposed to return an int.

Luke




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux