

#define __MAIN_C__
const char mychar1[6]="ABCDEF";
const char *mycharptr;
int mymode;
void xgetstr1(void);
void xgetstr2(void);
typedef struct 
 {int mode;
  void (*funcptr1)();
  const void (*funcptr2)(); //Warning[Pe815]: type qualifier on return type is meaningless D:\Documents and Settings\s.d.k\workspace\mynewprj\src\mymain.c 11 
                            
  } myoneset;

void xgetstr1(void){	mycharptr=&mychar1[0];}
void xgetstr2(void){	mycharptr=&mychar1[1];}
  
myoneset listofsets[2] =
 {{1,&xgetstr1,&xgetstr2}, {3,&xgetstr2,&xgetstr1}};//Error[Pe144]: a value of type "void (*)(void)" cannot be used to initialize an entity of type "void const (*)()" D:\Documents and Settings\s.d.k\workspace\mynewprj\src\mymain.c 19 

    

int main (void)
{
   const void (*myfuncptr)();//Warning[Pe815]: type qualifier on return type is meaningless 
   int i ;
   mycharptr=&mychar1[0];
   mycharptr=&mychar1[2];			
	 	
   myfuncptr=&xgetstr1;//Error[Pe513]: a value of type "void (*)(void)" cannot be assigned to an entity of type "void const (*)()" 

   
		
   myfuncptr=listofsets[0].funcptr1;//Error[Pe513]: a value of type "void (*)()" cannot be assigned to an entity of type "void const (*)()" D:\Documents and  

   myfuncptr=listofsets[1].funcptr2;
	
   myfuncptr=0;
 
   mymode=2;
   for (i=0;i<2;i++)
   {
      if (listofsets[0].mode==mymode)
         myfuncptr=listofsets[1].funcptr2;
   } 	
   return(0);
}


