C
cody
i basically want to create an object which contains an array (the last
element of the class).
the size of the array is determined when the object is created. for
performance reasons (avoiding cache misses) the whole objekt should be in
one linear chunk of memory, that is the array starts where the objekt ends
in memory.
class Cool
{
Cool (int arraysize) { .. }
char foo;
// more stuff goes here
float bar;
int[] myCoolArray; // that is the array where &myCoolArray==(&bar+1)
}
--
cody
Freeware Tools, Games and Humour
http://www.deutronium.de.vu
[noncommercial and no fucking ads]
element of the class).
the size of the array is determined when the object is created. for
performance reasons (avoiding cache misses) the whole objekt should be in
one linear chunk of memory, that is the array starts where the objekt ends
in memory.
class Cool
{
Cool (int arraysize) { .. }
char foo;
// more stuff goes here
float bar;
int[] myCoolArray; // that is the array where &myCoolArray==(&bar+1)
}
--
cody
Freeware Tools, Games and Humour
http://www.deutronium.de.vu
[noncommercial and no fucking ads]