I'm trying to create library in C++ that will be used by various programming languages (like Java, C++, C#). Code will be cross platform (Linux/Windows). One function should return array of simple structures:
struct Aaa {
int c;
int d;
}
What is the best way to pass array of Aaa to caller?
I was thinking about function signature that helps to get [] of Aaa to caller, but it's realization is complicated.
void abc(Aaa* a[], *int array_length )
{
...
}
One of alternatives is to return std::vector, but I suppose Java and C# will be not happy about that?
std::vector, then wrap it up so other types can be provided for languages that need them.