L
Lukas Mai
Purl Gurl replied to itself:
That's why I said MSVC++ 6 is obsolete. It simply isn't a conforming C++
implementation. See 3.6.1 #5 [basic.start.main]:
| A return statement in main has the effect of leaving the main function
| (destroying any objects with automatic storage duration) and calling
| exit with the return value as the argument. If control reaches the end
| of main without encountering a return statement, the effect is that of
| executing return 0;
Note that an exit status of 1 is unportable; the only portable values
are 0 or EXIT_SUCCESS for success and EXIT_FAILURE for failure (the
Would you like to consult the C++ standard, phallic symbol of atrocity?
FYI: C++ (unlike Perl) isn't an empirical science. Your "compiler" doesn't
define the language.
Frank
(shoveled out mule manure)
int main() no int return in body to produce a message,
--------------------Configuration: test1 - Win32 Debug--------------------
Compiling...
test1.cpp
C:\Visual_c\MSDev98\MyProjects\test1.cpp(14) : warning C4508: 'main' : function should return a value; 'void' return type assumed
"void return type assumed"
void main(void)
int main()
{ return 0; }
That's why I said MSVC++ 6 is obsolete. It simply isn't a conforming C++
implementation. See 3.6.1 #5 [basic.start.main]:
| A return statement in main has the effect of leaving the main function
| (destroying any objects with automatic storage duration) and calling
| exit with the return value as the argument. If control reaches the end
| of main without encountering a return statement, the effect is that of
| executing return 0;
int main()
{
exit(1);
Note that an exit status of 1 is unportable; the only portable values
are 0 or EXIT_SUCCESS for success and EXIT_FAILURE for failure (the
latter two are macros defined in said:return 0; /* never executed runtime is perfect */
}
Would you like to try again, Bozo?
Would you like to consult the C++ standard, phallic symbol of atrocity?
using namespace std
std::ctime & std:rintf
--------------------Configuration: test2 - Win32 Debug--------------------
Compiling...
test2.cpp
C:\Visual_c\MSDev98\MyProjects\test2.cpp(4) : error C2871: 'std' : does not exist or is not a namespace
C:\Visual_c\MSDev98\MyProjects\test2.cpp(11) : error C2653: 'std' : is not a class or namespace name
C:\Visual_c\MSDev98\MyProjects\test2.cpp(13) : error C2653: 'std' : is not a class or namespace name
Error executing cl.exe.
test2.obj - 3 error(s), 0 warning(s)
Would you like to try again, Bozo?
Did you actually include said:When you troll, fate almost always has it
you end up flaunting your ignorance, which
is most logical because trolls are ignorant.
FYI: C++ (unlike Perl) isn't an empirical science. Your "compiler" doesn't
define the language.
Purl Gurl
Frank