On 20/08/2013 at 13:42, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) : C++ ;
---------
Hi Folks,
I made a new topic here a few hours a go, but it seems to have disappeared. So my apologies if a similar topic turns up somewhere later...
I'm trying to make a vector of BaseLinks. The way I've been attempting to is like this:
struct MyStruct
{
std::vector< std::vector < BaseLink > > LinkList;
}MStr;
// deliberate two stage vector...
The above compiles, but when I try variations of BaseLink/BaseList2D like this:
// below assumes the vector is made/sized correctly somewhere/somehow
BaseList2D *ListedObj;
ListedObj = MStr.LinkList[1][1].GetLink(doc);
it gives me a compile error that says this:
'BaseLink::BaseLink' : cannot access private member declared in class 'BaseLink'
Is it possible to make a vector of baselinks? I know the first code snippet compiles - but is that safe and OK? I haven't used vectors in this way before - though I've used std::vectors for basic things like LONG/Real/String etc.
Is it possible with a BaseLink? Do I need to Alloc() each vector somehow when making/resizing the vector?
Regards,
WP.