blitz types to c++?

Blitz3D Forums/Blitz3D Programming/blitz types to c++?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I am wondering if anyone knew about this before, and if there is a better way to do it?

c++ header file:
class test
{
public:
	int x,y,z;
	float a,b;
};



c++ cpp file:
#include <stdlib.h>
#include <math.h>
//the header file
#include "testing.h"

#define BBDECL extern "C" _declspec(dllexport)

#define BBCALL _stdcall

BBDECL void BBCALL boo(test* obj)
{
	obj->a = 5.6f;
	obj->x = 4;
	obj->y = 5;
	obj->z = 6;
	obj->b = 10.9f;
}



the decls file in userlibs:
.lib "testing.dll"

boo(obj*):"_boo@4"



the blitz file:
Type test
	Field x,y,z
	Field a#,b#
End Type

t.test = New test
boo(t)

Print(t\a)
Print(t\b)
Print(t\x)
Print(t\y)
Print(t\z)
waitkey()
end



c++ code compiled in visual c++ 2005 express edition.
I am not sure if you can return a c++ class, all I have tried is passing a blitz type into the c++ class.

Lego is the best...