dynamic allocation of structs can somebody help me get this thing straight...,
am making a dynamic struct.., something is wrong here..,
Code:
typedef struct tagASTRUCT
{
int m_data;
void Create(int data)
{
m_data = data;
}
{
}
}*ASTRUCT
ASTRUCT object;
// now, i'd like to specify the number of structs that i'll be usingo n runtime..,
object = new tagASTRUCT[10]; // example 10 kinds of this,
so how do i access the function in it? like this?
object.Create(...);
why is not like this?
object->Create(...);
thanks,