Hi all
I have this code that appears to be simple enough

Code:
#define TEST_LIMIT 100
	.
	.
	.

struct menu_info {	
	long rpt_options;	
	long rpt_default;	
	char **narr_menu;	
	char **plot_menu;	
	char **eqns_menu;	
	char **cust_menu;	
};
	.
	.
	.

	struct menu_info *M[TEST_LIMIT];
	.
	.
	.

void main(int argc, char **argv)
{
	.
	.
	.

	for(i = 0; i < TEST_LIMIT; i++)
		M[i]->rpt_default = 0L;
on the first iteration (i.e i=0) I get this message:
Unhandled exception at 0x013d3406 in myprogram.exe: 0xC0000005: Access violation writing location 0x00000004.

Before getting into the for loop, M appears to be correct and pointing to where it supposed to.

Any clue anybody?
Thanks
ZA