This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C182 error kicking my butt

Hopefully this makes sense. I've cut down the actual code to make this short.

I have a series of strings as shown:


char code Num1[] =  {"One  "};
char code Num2[] =  {"Two  "};
char code Num3[] =  {"Three"};


I then have an array of pointers that have all the address of the start of those strings:

code char code *CHNLTable[] = { Num1, Num2, Num3};


I then have a pointer in a function that I want to assign to an element in the array and I get a C182 "Pointer to different objects" warning.

void func(void){	
  unsigned int *myptr;
   myptr = &CHNLTable;

   ...code that uses myptr

}

I don't understand the warning AND the code seems to work fine. Can someone explain to me the dumb thing I'm doing??

Parents Reply Children