First I'd like to become a better programmer. ( I can hear the cheers).
At the moment, I want to know more about structs. Anybody recommend an on-line reference?
Second in the meantime why does this compile
At the moment, I want to know more about structs. Anybody recommend an on-line reference?
Second in the meantime why does this compile
Code:
typedef struct equity
{
char date[14];
char name[20];
float high;
float low;
int signal;
int num;
float value;
} stock_index;
void open_list()
{
stock_index *temp;
temp = (stock_index*)calloc(num_of_indices, sizeof(stock_index));
/[code]
but this doesn't
[code]/
typedef struct equity
{
char date[14];
char name[20];
float high;
float low;
int signal;
int num;
float value;
} stock_index;
stock_index *temp;
temp = (stock_index*)calloc(num_of_indices, sizeof(stock_index));
void open_list()
{
/[code]
thanks