Hi Guys.
I bought monkey last saturday and I´m testing. Well, now I got a question. You can do something like this:
Strict
#if TARGET="glfw"
Import "supi.cpp"
#else
Import "supi.js"
#endif
Extern
Function SomTest:Int(a:Int, b:Int)="Add"
Public
Function Main:Int()
Print SomTest(300,400)
Return 0
End Function
Supi.cpp:
#include <iostream>
using namespace std;
int Add(int a, int b)
{
cout << "C++" << endl;
return a+b;
};
Supi.js
function Add(a,b)
{
return a+b;
}
This means, you can write your own version for your fav. target. But how can I declare a class in C++ and use it with monkey as a normal class? Got problems with the constructor, someone has experience with this part of monkey?
Mfg Suco
|