It says, that in a hosted environment, main
should have a type. Quote from C++ standard 3.6.1, paragraph 2
An implementation shall not predefine the
main
function. This function
shall not be overloaded. It shall have a return type of typeint
, but
otherwise its type is implementation-defined. All implementations
shall allow both — a function of () returningint
and — a function of
(int, pointer to pointer to char) returningint
as the type ofmain
(8.3.5).
5
solved error: ISO C++ forbids declaration of `__nomain’ with no type