ISO C++ document section 3.6.1 #2:
An implementation shall not predefine the main function. This function shall not be overloaded. It shall have a return type of type int, but otherwise its type is implementation-defined.
It might work, however if a compiler is standard conforming, it will reject your code because of an error.