I am having a structure
typedef struct
{
UINT32 num_pairs;
UINT32 value;
}
SCSI_ENTRIES;
I need to dynamically instantiate the objects for this structure on fly .
for (int i = 0; i < 50; i++)
{
if ( port[i] )
{
port_valid_count += 1;
// Please tell me how to instantiate
// SCSI_ENTRIES objects dynamically,
// based on port_valid_count.
// Something like SCSI_ENTRIES entries[port_valid_count] ;
}
}
I need to increase the objects for the structure every time the port_valid_count is incremented.