Re: The worst 'hello world' example ever written...

T

The_Sage

Reply to article by: "Randall Hyde said:
Date written: Thu, 18 Sep 2003 05:47:02 GMT
MsgID:<[email protected]>

"The_Sage" is making everyone look like idiots!

No, just you.
It's wonderful how warped his mind is.
He posts some code and argues about how correct
it is known *damn* well no one will try and compile
it to see what happens!

On the other hand, you are unable to post any code at all in defense of even
just one of your uneducated claims.
It's amazing how long this argument has been going
on and no one as bothered to call him on the point
that he is simply *lying* about the fact that Borland C++
will compile that code without that semicolon at the
end of the "cout" expression.
Okay, here's the code:
#include <iostream.h>
void main()
{
cout << "Hello, World!"
}

You are a total idiot Randall. that is NOT my example at all. The proper example
is:

#include <iostream.h>
void main() {
cout << "Hello, World!" }

The way you have typed it should return errors, but that is not the way I
specified it.
Here's what I get when I run it through BCC32 (v5.0)
g:\>bcc32 hw.cpp
Borland C++ 5.0 for Win32 Copyright (c) 1993, 1996 Borland International
hw.cpp:
Error hw.cpp 5: Statement missing ; in function main()
Error hw.cpp 5: Compound statement missing } in function main()
*** 2 errors in Compile ***
Now, you'll have to forgive me for having such an old version
of the compiler. Maybe they introduced this "bug" into their
compiler in a later version (i.e., BCC32 v5.5 or later).
However, it sure looks to me like Borland C++ v5.0 chokes on the
missing semicolon.
Oh, Microsoft VC++?
Well, I must admit I'm only running v12.00.8804, but here's what
it returns:
g:\>vcvars32
Setting environment for using Microsoft Visual C++ tools.
g:\>cl hw.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
hw.cpp
hw.cpp(5) : error C2143: syntax error : missing ';' before '}'
Sorry, I don't have the IBM compiler, so I can't try that one out.
In any case, I'm sure that "The_Sage" is laughing his behind off
because he's had this argument going on for quite some time based
totally on a lie; I bet he's real amused that everyone fell for this
nonsense of his, hook, line, and sinker (not that a semicolon is valid,
but that Borland and MS compilers would actually accept this nonsense).
Hopefully, this puts an end to this junk and he can go back to claiming
that my HLA (assembly) code is really C (I haven't found a C compiler
that accepts it yet, Borland, MS, IBM, or otherwise...).

The laugh is on you, Randall. You cannot even follow a simple elementary
example. High Level Assembly? Heck, you don't even know what those words mean!

Haha!

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
B

Buster

The_Sage said:
The proper example
is:

#include <iostream.h>
void main() {
cout << "Hello, World!" }

The way you have typed it should return errors, but that is not the way I
specified it.

Borland C++ Builder 6 Professional (Update 4):

C:\CBuilder6\Projects>type voidmain.cpp
#include <iostream.h>
void main() {
cout << "Hello, World!" }

C:\CBuilder6\Projects>bcc32 voidmain.cpp
Borland C++ 5.6.4 for Win32 Copyright (c) 1993, 2002 Borland
voidmain.cpp:
Error E2379 voidmain.cpp 3: Statement missing ; in function main()
*** 1 errors in Compile ***
 
T

The_Sage

Reply to article by: Noah Roberts said:
Date written: Fri, 19 Sep 2003 19:37:47 -0700
MsgID:<[email protected]>
Even if that where true,

There are no ifs about it, it most definitely is allowed by the Standard.
C++ code that uses any other return type than
int for main is not standard compliant.

Then explain why the standard says it is okay to use return type IN ADDITION to
int? Why do you guys keep trying to ignore reality so you can support your
religion of "pure" C++? Here it is again for those of you who can't read yet...

"3.6.1 Main function paragraph 2:
It shall have a return type of type int

-->BUT<--

otherwise its type is implementation-defined"

Duh! The int is mandatory but void is optional.

Get a clue all you other idiots out there: The ISO standard says it is okay to
use "void main()" but even if you want to blindly and ignorantly deny that fact,
then explain why MS, Borland, and IBM all agree with my interpretation of the
ISO standard? If you can't answer that question with something other than a
blatent make believe assertion, ie -- something other than your meresay or
hearsay, say a real life quote from one of those organizations to the effect of
"Opps! We thought we were ISO complaint but I guess we really aren't".

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
T

The_Sage

Reply to article by: Noah Roberts said:
Date written: Fri, 19 Sep 2003 19:48:26 -0700
MsgID:<[email protected]>
In file included from /usr/include/c++/3.3/backward/iostream.h:31,

I noticed you "forgot" to specify your compiler. Some compilers will not compile
the above and some will, the point being that MS, Borland, and IBM will. Please
refer to my other reply to your post today and explain.

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
T

The_Sage

Reply to article by: "Buster said:
Date written: Sat, 20 Sep 2003 13:25:28 +0100
MsgID:<[email protected]>
Borland C++ Builder 6 Professional (Update 4):
C:\CBuilder6\Projects>type voidmain.cpp
#include <iostream.h>
void main() {
cout << "Hello, World!" }
C:\CBuilder6\Projects>bcc32 voidmain.cpp
Borland C++ 5.6.4 for Win32 Copyright (c) 1993, 2002 Borland
voidmain.cpp:
Error E2379 voidmain.cpp 3: Statement missing ; in function main()
*** 1 errors in Compile ***

I thought that your pure C++ wouldn't accept the .h in iostream.h? And what
about using the right bracket as a terminator for the last line? I thought your
pure C++ compiler would only accept semicolons?

Wow, it's a miracle! First you idiots claim that every single line is wrong in
my program, now it is only one measley error? What wrong with all you
professional, competent programmers out there? When you flag something as
"completely wrong", I would expect professional, competent programmers to know
what they are talking about. You are all such a disappointment!

I tell you what, at the rate you are going, you just might get your one error
done to none for once in your life, if you keep trying. You could try different
versions of your Borland compiler and see if they all give the same error.

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
J

James Lothian

The_Sage said:
I noticed you "forgot" to specify your compiler. Some compilers will not compile
the above and some will, the point being that MS, Borland, and IBM will. Please
refer to my other reply to your post today and explain.

#include <iostream.h>

void main() {
cout << "Hello world" }
Compiling...
sage.cpp
h:\cdt\migrun working\sage.cpp(6) : error C2143: syntax error : missing
';' before '}'
Error executing cl.exe.

sage.obj - 1 error(s), 0 warning(s)

Visual C++ 6.0.

The semicolon is obligatory. You are talking rubbish.
 
D

David B. Held

The_Sage said:
[...]
Obviously you don't know what a fact is then.

A fact is a statement of something that is true. Like that
main() must return int. So far, it's about 10 people who
all agree that this is what the standard says, several of
which have written more C++ code in a month than you
have in your entire life, vs. you, who judges the
conformance of a compiler on what it parsers, rather
than how it implements the standard. So, explain to me
how you have become so enlightened by the "facts",
and all these C++ experts, who participate in c.l.c++
every day, are all wrong.
I asked you for facts and all you can do is call people
names.

Actually, I've only called you names. And you deserve
it, you two-bit troll. And that's one bit more than you
deserve. Speaking of calling people names, let's see if
you recognize any of these choice quotes:

"Obviously you are an armchair programmer
since you are merely guessing."

"You just proved you are illiterate."

"Wow, yet another completely illiterate idiot. Here, let
me put this in simple terms an imbecile you like could
understand."

"Obviously you are illiterate, so let me put this in
terms even an illiterate idiot like you can understand..."

"You are sorry and a jackass and an idiot."

"I'm waiting for one of you illiterate idiots to quote any
legitimate authority that states that all those ISO
compliant compilers such as MS, IBM, and Borland
put out that, in addition to returning an int for main() also
allow void, are therefore not ISO complaint as they claim
they are."

"Given the way you cannot support anything you claim
with facts or references or logic, I must conclude you are
a total idiot."

"Are you going to bark all day little doggy, or are
you going to bite?"

"You are a total idiot Randall."

Now, the facts are thus:

1) The ISO standard has been quoted to you numerous
times

2) You yourself quoted an analysis which included the
observation that "void main()" is ill-formed

3) You have seen the relevant passage in the standard

4) You have ignored the part that obviates "void main()"
numerous times

5) Not a single person on the newsgroup has agreed
with your position

6) Some of those people are recognized C++ experts,
while you are not

7) At least one of them helped WRITE the C++
standard

8) Bjarne Stroustrup, the CREATOR of C++, says
that "void main()" is ill-formed. This deserves some
closer mention, so let's look:

http://www.research.att.com/~bs/bs_faq2.html#void-main
(Emphasis mine)

The definition
void main() { /* ... */ }

IS NOT AND NEVER HAS BEEN C++, nor has
it even been C. See the ISO C++ standard 3.6.1[2]
or the ISO C standard 5.1.2.2.1. A conforming
implementation accepts
int main() { /* ... */ }

and
int main(int argc, char* argv[]) { /* ... */ }
A conforming implementation may provide more
versions of main(), BUT THEY MUST ALL HAVE
RETURN TYPE INT. The int returned by main() is a
way for a program to return a value to "the system" that
invokes it. On systems that doesn't provide such a
facility the return value is ignored, BUT THAT
DOESN'T MAKE "void main()" LEGAL C++ or legal
C. EVEN IF YOUR COMPILER ACCEPTS
"void main()" AVOID IT, OR RISK BEING
CONSIDERED IGNORANT BY C AND C++
PROGRAMMERS.

Let's see...Bjarne is a C++ programmer *and* a C
programmer, so it doesn't seem much of a stretch to
say that he probably considers you ignorant. Note
also that Bjarne is warning you of exactly what has
happened here. That C++ programmers in general
would think you're ignorant. If you don't recognize
your own ignorance, then perhaps you're not a C++
programmer, in which case you shouldn't be making
pronouncements about the correctness of C++ code.
Are you going to bark all day little doggy, or are
you going to bite?

Tell me how those facts worked out for ya.

Dave
 
P

Petter Strandmark

The_Sage said:
Quotes please, that way we can see if you are making this all up as you go along
just so you can win an argument, or if IBM, MS, and Borland are all on the
record as saying, "Yes, we violated the ISO standard but we don't care, we are
going to call it ISO compliant anyway". I await your proof.

Quote from the Visual C++ help files:

"The following topics are some of the known places where the Visual
C++ implementation of C++ does not agree with the C++ standard. The
section numbers refer to section numbers in the C++ standard.

Compiler Limits
2.11 Alternative Keyword Representations
3.4.2 Argument-Dependent Name Lookup
6.4 Scope of a Name Declaration in a Selection Statement
14 export Keyword on a Template
14.5.2 Out-of-Class Template Definitions
14.5.4 Class Template Partial Specialization
14.5.5.2 Partial Ordering of Function Templates
15.4 Function Exception Specifiers
18.6.4 The uncaught_exception Function
"
 
S

Siana

Petter said:
Quote from the Visual C++ help files:

"The following topics are some of the known places where the Visual
C++ implementation of C++ does not agree with the C++ standard. The
section numbers refer to section numbers in the C++ standard.

Compiler Limits
2.11 Alternative Keyword Representations
3.4.2 Argument-Dependent Name Lookup
6.4 Scope of a Name Declaration in a Selection Statement
14 export Keyword on a Template
14.5.2 Out-of-Class Template Definitions
14.5.4 Class Template Partial Specialization
14.5.5.2 Partial Ordering of Function Templates
15.4 Function Exception Specifiers
18.6.4 The uncaught_exception Function
"

And all in the name of Backward Compatibility...
S.
 
K

Kwailo

The_Sage said:
Reply to article by: "Attila Feher" <[email protected]>
Date written: Thu, 18 Sep 2003 11:35:06 +0300
MsgID:<[email protected]>
No, it does not. 3.6.1 Main function paragraph 2:
"*It shall have a return type of type int*, but otherwise its type is
/implementation-defined/. All implementations shall allow both of the
following definitions of main:
int main() { /* ... */ }
and
int main(int argc, char* argv[]) { /* ... */ }
"
continuing with
"The function main shall not be used (3.2) within a program. The linkage
(3.5) of main is /implementation-defined/."
For those who can read and understand (not you Rage, opps Sage) it says:
The main function must have the return type int. However you are not
allowed to call it so this int is for the implementation not you. The rest
of the function signature can be whatever the implementers define *but* it
must define the above two full signatures as valid.
Nope Sage. You have just proved that not only you are clueless and
arrogant, but it is also hopeless for you to ever change.

Wow, yet another completely illiterate idiot. Here, let me put this in simple
terms an imbecile you like could understand. From the quote you JUST GAVE...

"3.6.1 Main function paragraph 2:
It shall have a return type of type int..."

Which all ISO compilers like MS, Borland, and IBM do.

"...but otherwise..."

See that word? It means that the standard allows breathing room for other return
types other than int. Duh!

"its type is implementation-defined"

Therefore, any compiler that implements other types of main() functions other
than int main(), such as void main(), are ISO compliant. MS, Borland, and IBM
use int main() AND ALSO IMPLEMENT/DEFINE void main(), therefore they are ISO
compliant. Please get a clue before posting next time! Gawd, how stupid can you
guys get! The standard clearly state that other return types are allowed, in
addition to int!

The Sage

No, no no. It says that main's type, OTHER THAN its return value (which is
why you get the word "otherwise" there), is implementation defined. That
means
that the implementation is free to define additional mains that accept
different
parameter lists, but do NOT return values other than main.

"Sage", type and return value are not the same thing.

Kwailo
 
T

The_Sage

Reply to article by: "Kwailo said:
Date written: Sun, 21 Sep 2003 10:09:04 +0200
MsgID:<[email protected]>
No, no no. It says that main's type, OTHER THAN its return value (which is
why you get the word "otherwise" there), is implementation defined. That
means that the implementation is free to define additional mains that accept
different parameter lists, but do NOT return values other than main.

Wrong again. It clearly said *return* type, not parameter. Try another lame
guess.

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
T

The_Sage

Reply to article by: "David B. Held said:
Date written: Sat, 20 Sep 2003 16:30:43 -0500
MsgID:<[email protected]>
A fact is a statement of something that is true.

Nope. Truth is not always fact, like the Gospel Truth for example, which is not
based on facts.
Like that main() must return int.

Yes it is.
So far, it's about 10 people who
all agree that this is what the standard says,

Too bad none of them have actually read the standard. I can read where the
standard says you can return other types for main() also, ie -- int is mandatory
to include in a compiler, but void is an optional alternate.
several of
which have written more C++ code in a month than you
have in your entire life

Is that another example of what you call a "fact"? When you go around making up
shit out of thin air, how can we possibly trust anything you claim?

Either you have facts or you don't and your whining is not a fact, so...

int main(int argc, char* argv[]) { /* ... */ }
A conforming implementation may provide more
versions of main(), BUT THEY MUST ALL HAVE
RETURN TYPE INT. The int returned by main() is a
way for a program to return a value to "the system" that
invokes it. On systems that doesn't provide such a
facility the return value is ignored, BUT THAT
DOESN'T MAKE "void main()" LEGAL C++ or legal
C. EVEN IF YOUR COMPILER ACCEPTS
"void main()" AVOID IT, OR RISK BEING
CONSIDERED IGNORANT BY C AND C++
PROGRAMMERS.

This right here proves just how illiterate you are. Let's take a look at that
statement again, and see just what it says...
A conforming implementation may provide more versions of main()

How many versions of main() can I return according to that article? One? Two? As
many as I like? The answer is: As many as I like.
BUT THEY MUST ALL HAVE RETURN TYPE INT

So let's see, if I have a compiler and it has two types of main, one which
returns an int and another which returns a void, has it violated the ISO
standard? The answer is: No, because the compiler can have as many versions of
main as it likes, just so long as one of those types is an int.
On systems that doesn't provide such a facility the return value is ignored, BUT THAT
DOESN'T MAKE "void main()" LEGAL C++ or legal C.

It also doesn't make it illegal.
EVEN IF YOUR COMPILER ACCEPTS "void main()" AVOID IT, OR RISK BEING CONSIDERED
IGNORANT BY C AND C++ PROGRAMMERS.

Haha! Who cares what other "programmers" like you consider? Wow! I'm really
scared by that serious threat. I'm not afraid of people who can't understand the
simple english of a standard and claim that a simple three line program has five
errors, even though those who bothered to compile it could never get more than
one. Haha! Please, get serious! Haha!

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
G

Gary Labowitz

At last! after reading all this time, a question I CAN answer.
Get a clue all you other idiots out there: The ISO standard says it is okay to
use "void main()" but even if you want to blindly and ignorantly deny that fact,
then explain why MS, Borland, and IBM all agree with my interpretation of the
^^^^^^^^^
ISO standard? If you can't answer that question with something other than a
blatent make believe assertion, ie -- something other than your meresay or
hearsay, say a real life quote from one of those organizations to the effect of
"Opps! We thought we were ISO complaint but I guess we really aren't".

[Meeting at MS, Borland, IBM...design group for compilers:]
A: Well, we are down to topic 17, use of main.
B: I thought we handled it already!
A: No, we still allow "void main" when the standard says all main functions
must return int.
B: I didn't know that!
A: Well, you're an asshole.
C: Come on, let's stick to business.
B: Well, I don't have any code to detect "void main" and raise an error.
A: Couldn't you add it?
B: It might spoil my weekend. Besides, I always thought you could use "void
main!"
A: Well, it's not right.
C: But there are lot's of assholes out there, like A, who think you can use
"void main."
B: Maybe we shouldn't make it an error. Think of all the assholes....
A: Well, it still isn't right, but okay. We leave it alone just for all the
assholes.
C: I think there must be a lot of them.
B: Yeah, and they buy our compiler, too. Has anybody told marketing?
C: I think they already know.
[General laughter all around.....]
 
T

The_Sage

Reply to article by: James Lothian said:
Date written: Sat, 20 Sep 2003 21:13:47 +0100
MsgID:<[email protected]>
#include <iostream.h>
void main() {
cout << "Hello world" }
Compiling...
sage.cpp
h:\cdt\migrun working\sage.cpp(6) : error C2143: syntax error : missing
';' before '}'
Error executing cl.exe.
sage.obj - 1 error(s), 0 warning(s)
Visual C++ 6.0.
The semicolon is obligatory. You are talking rubbish.

And you are basing that on just one compiler? How come it compiles on mine? And
what about all those other "errors" it was supposed to have contained? Wasn't
void main() was an "error"? Wasn't iostream.h an error? Wasn't cout supposed to
be illegal unless it was written as std::cout? Not to mention, if you use "int
main()" you must end the program with a "return n", otherwise, how does the
program return anything? I would hardly consider one error an example of "The
worst 'hello world' example ever written...". Add to that the fact that all of
you claimed all those other errors, your total score is -5 on the world's
simplest program, so even if I did make an error, it is only one small one as
compared to your four.

So considering your ability to recognize legitimate C++ errors, I doubt you are
very good at knowing how to even compile a program correctly, which makes me
wonder if your example was made up?

The Sage

=============================================================
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============================================================
 
D

Duane Hebert

So far, it's about 10 people who
Well 11 if you count Bjarne Stroustrup. From
http://www.research.att.com/~bs/bs_faq2.html#void-main


The definition
void main() { /* ... */ }
is not and never has been C++, nor has it even been C. See the ISO C++
standard 3.6.1[2] or the ISO C standard 5.1.2.2.1. A conforming
implementation accepts
int main() { /* ... */ }
and
int main(int argc, char* argv[]) { /* ... */ }
A conforming implementation may provide more versions of main(), but they
must all have return type int. The int returned by main() is a way for a
program to return a value to "the system" that invokes it. On systems that
doesn't provide such a facility the return value is ignored, but that
doesn't make "void main()" legal C++ or legal C. Even if your compiler
accepts "void main()" avoid it, or risk being considered ignorant by C and
C++ programmers.
In C++ main() need not contain an explicit return statement. In that case,
the value returned is 0, meaning successful execution. For example:

#include<iostream>

int main()
{
std::cout << "This program returns the integer value 0\n";
}
Note also that neither ISO C++ nor C99 allows you to leave the type out of a
declaration. That is, in contrast to C89 and ARM C++ ,"int" is not assumed
where a type is missing in a declaration. Consequently:
#include<iostream>

main() { /* ... */ }
is an error because the return type of main() is missing.



Too bad none of them have actually read the standard. I can read where the
standard says you can return other types for main() also, ie -- int is mandatory
to include in a compiler, but void is an optional alternate.

I imagine that Stroustrup has read it.
 
N

Noah Roberts

The_Sage said:
So let's see, if I have a compiler and it has two types of main, one which
returns an int and another which returns a void, has it violated the ISO
standard? The answer is: No, because the compiler can have as many versions of
main as it likes, just so long as one of those types is an int.

I see what the misunderstanding is. "Sage" thinks that the above means
that all implementations must have at least one main that returns an
int. The problem is caused by a misunderstanding of the sentance:


A conforming implementation may provide more versions of main(), but
they must all have return type int.

Such additional versions might include:

int main(int argc, char **argv, char **env)

which is indeed an additional version of main that still conforms to the
standard by returning type int. I believe the following would also be a
conformant main signature (I doubt any would create it though):

int main(std::vector< std::string >);

However, the following is not:

void main( anything );

because it does not conform to "they must all have return type int".

Once again:

"A conforming implementation may provide more versions of main(), but
they must all have return type int."

The subject of "they must all have return type int" is the additional
main signatures, NOT the compiler implementation. It is too bad english
is such a subpar language.

NR
 
N

Noah Roberts

The_Sage said:
I noticed you "forgot" to specify your compiler. Some compilers will not compile
the above and some will, the point being that MS, Borland, and IBM will. Please
refer to my other reply to your post today and explain.

The whole point of having a C++ standard is that code written in std c++
will compile on any conformant C++ compiler. It does not matter what
compiler I am using, what matters is that it is standard conformant.

NR
 
N

Noah Roberts

The_Sage said:
And you are basing that on just one compiler? How come it compiles on mine?

Bug in the parser? Who knows why it accepts bad code...

And
what about all those other "errors" it was supposed to have contained?

One problem with C and C++ is often the compiler will puke on one error
before ever realizing there where several others.

Wasn't
void main() was an "error"?

Warnings are acceptable.

Wasn't iostream.h an error?

Some compilers will provide iostream.h for compatability with
pre-standard code. The same reason why some compilers still accept K&R C.

Wasn't cout supposed to
be illegal unless it was written as std::cout?

Usually when a compiler provides *.h for backwards compatability it
defaults to the std namespace assuming that namespaces are not used in
such code.

Not to mention, if you use "int
main()" you must end the program with a "return n", otherwise, how does the
program return anything?

As has been discussed in this thread, return 0 is implicit.

I would hardly consider one error an example of "The
worst 'hello world' example ever written...".

It probably isn't the worst ever written, but it is certainly wrong on
many counts.

NR
 
N

Noah Roberts

The_Sage wrote: Here it is again for those of you who can't read yet...
"3.6.1 Main function paragraph 2:
It shall have a return type of type int

-->BUT<--

otherwise its type is implementation-defined"

Duh! The int is mandatory but void is optional.

That statement does not support your accertation. Once again you have
misunderstood the text you are quoting. "It shall have a return of type
int" leaves no room for a but. The second part, "otherwise its type is
implementation-defined", speaks of other parts of main's signature and
NOT the return type which has been explicitly required to be of type
int. You have already been told this.

NR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top