* Pep:
ju**********@yahoo.co.in wrote:
Is the following valid in c++ ?
void main(void)
{
}
Why don't you compile it and see?
The result of that approach depends on the compiler, although some compilers,
such as <url: http://www.comeaucomputing.com/tryitout/>, are fairly reliable
guides to what the standard is.
'void main' is not valid C++, and not valid C, and never has been.
The OP should check this group's FAQ, and also Bjarne Stroustrup's C++ FAQ.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?