Modulinos: Difference between revisions
Content added Content deleted
Line 33: | Line 33: | ||
=={{header|C++}}== |
=={{header|C++}}== |
||
C++ programs cannot do scripted main, because main() is implicitly included by another program, test.c, even when scriptedmain.h is empty. |
|||
C++ has scripted main by default. |
|||
The following example will not work with another program, test.c, due to duplicate main() functions at compile time. |
|||
<lang cpp>#include <iostream> |
<lang cpp>#include <iostream> |