Even if the compiler allows it, ``++main++`` should not return ``++void++``. The return value of ``++main++`` is used by callers to determine whether the program executed successfully or not. A ``++0++`` return value indicates that the program completed successfully. Anything else indicates an error. 


Since both standards and conventions dictate that ``++main++`` return an ``++int++``, any caller that evaluates the return value of a ``++void main++`` method will believe the program executed successfully, regardless of the actual outcome.


Further, ``++main++``'s return type should not be left to default to ``++int++``, as happens when it is not expressly listed. Instead, it should be set explicitly to ``++int++``.


== Noncompliant Code Example

----
main( int argc, const char* argv[] ) {  // Noncompliant; int return type not explicit
  // ...
}

// file boundary here...

void main(void) { // Noncompliant; void return type
  // ...
}
----

h2 Noncompliant Code Example

----
int main( int argc, const char* argv[] ) {
  // ...
}

// file boundary here...

int main(void) {
  // ...
}
----

