Reflex Member Invoke Parameter ret

I’m a bit confused. I noticed the first parameter of Member::Invoke is T& ret. But the documentation doesn’t say what that parameter is used for. This is my code:

void call(std::string fname)
{
	Reflex::Type T = Reflex::Type::ByName(fname);
	Reflex::Member M = T.MemberAt(1);
	int tst = 0;
	M.Invoke<int>(tst);
}

Using that empty int, I’m getting:

Unhandled exception at 0x52167D3A (libReflex.dll) in application.exe: 0xC0000005: Access violation reading location 0x0000006F.

I’m on Windows and using the prebuilt debug version of ROOT. I have Visual Studio Express 2012 for Windows Desktop.

Hi,

[quote=“kirbyfan64sos”]I’m on Windows and using the prebuilt debug version of ROOT. I have Visual Studio Express 2012 for Windows Desktop.[/quote]There is no binary version of ROOT which is compatible with Visual Studio 2012. You should use Visual Studio 2010 to compile your code (assuming you downloaded the VC10 version of ROOT)

Cheers, Bertrand.

Ok. I tried VS 2010 and it works.