Emmbedded prg not liking char *var[]={"data","data"};
I'm working on a PIC 18f4685 using MPLabs C18 C-compiler and I'm having issue when I try and create an array of phrases that I want to print out to my LCD.

If I use Codeblocks with gcc and enter this code:

    char *test[]={"test1","test2","test3","test4"};
    printf("%s %s %s %s\n",test[0],test[1],test[2],test[3]);
    
it prints out what I expect to the console...test 1 test 2 test 3 test4.

However, if I use this code in C18:

    	char *phrase[]={"test1","test2"};

I get warnings saying `type qualifier mismatch in assignment` and when I program the chip it spits out garbage to the LCD, which I kinda expected it would do.

What is the proper way to declare my phrases because something is obviously incorrect?




 
Emmbedded prg not liking char *var[]={"data","data"};
===

I'm working on a PIC 18f4685 using MPLabs C18 C-compiler and I'm having issue when I try and create an array of phrases that I want to print out to my LCD.

If I use Codeblocks with gcc and enter this code:

    char *test[]={"test1","test2","test3","test4"};
    printf("%s %s %s %s\n",test[0],test[1],test[2],test[3]);
    
it prints out what I expect to the console...test 1 test 2 test 3 test4.

However, if I use this code in C18:

    	char *phrase[]={"test1","test2"};

I get warnings saying `type qualifier mismatch in assignment` and when I program the chip it spits out garbage to the LCD, which I kinda expected it would do.

What is the proper way to declare my phrases because something is obviously incorrect?




 