Sobakava
Full Member level 6
CCS String Compare
How can I make something like this in
CCS PIC C Compiler?
char str1[10];
switch(str1) {
case "abcd" : dosomething...;
case "efgh" : dosomethingelse;
}
or
if (str1=="abcd") { dosomething }
!!
strcmp(str1,str2) does not work with constants
like "abcd".
!!
how can i make it with a memory effective method?
regards.
How can I make something like this in
CCS PIC C Compiler?
char str1[10];
switch(str1) {
case "abcd" : dosomething...;
case "efgh" : dosomethingelse;
}
or
if (str1=="abcd") { dosomething }
!!
strcmp(str1,str2) does not work with constants
like "abcd".
!!
how can i make it with a memory effective method?
regards.