kryton9 wrote:Code: Select all
IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D9,dimension2d<s32>(1024, 768),32,true,false,false);
IrrlichtDevice win = (*device);
The code you post is not using a reference. You are attempting to copy an
IrrlichtDevice, which, if I'm remembering correctly, is an abstract class and thus cannot be copied in this way.
If you want a reference, you need to tell the compiler that...
Code: Select all
IrrlichtDevice* device_ptr = ...;
IrrlichtDevice& device_ref = *device_ptr;
I don't really understand why you'd want to do this though. It doesn't buy you much of anything. All it does is guarantee that
device_ref refers to a non-null object and you get to use the . operator instead of ->.
Travis