Does anyone know how to delare a managed class in unmanaged code? This is driving me nuts, because I can call unmanaged from managed, but not the other way. Is there a way to do this? Thanks in advance.

I want this for example:

class foo
{
public:
//other code here

private:
managedClass^ test;
}

It's not possible. But you might put the managed code in a dll or static library.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.