Is it possible to call D functions from C++

krzaq via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 19 01:32:08 PDT 2015


On Thursday, 19 March 2015 at 07:42:48 UTC, Kagamin wrote:
> On Wednesday, 18 March 2015 at 15:54:04 UTC, krzaq wrote:
>> Oh, right. I'm sorry, I assumed void main() means D, since 
>> it's not legit C++.
>
> C++ allows implementation-defined return type of main.

I'm afraid that you've mistaken C++ for C. The C++ standard quite 
clearly says:
> 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.


More information about the Digitalmars-d mailing list