PDA

View Full Version : LWItemID convertion



avogad
04-19-2007, 09:09 AM
Hi,

I need to get the selected items from the scene, so I do the following:

LWItemID* id;

id = intinfo->selItems;

However, intinfo->selItems (const LWItemID *) can't be converted into LWItemID*.

Does anyone know how I could convert it ?!

(C++ plugin compiled with VCExpress 2005)

Cheers

Lightwolf
04-19-2007, 09:16 AM
"const LWItemID* id = intinfo->selItems;"
should do it in C++.

You could also do a const cast:
LWItemID* id;
id = const_cast<LWItemID *>(intinfo->selItems);

Also remember, id is an array.

Cheers,
Mike