Neither
orCode:char c = ';' ;
works.Code:char c = '\;' ;
Neither
orCode:char c = ';' ;
works.Code:char c = '\;' ;
The first one works fine and is correct. What problem are you having?
Try char c = 59; //Where 59 = ascii code of ';'
> Try char c = 59; //Where 59 = ascii code of ';'
Don't do that. That makes it dependent on a particular character set.
You probably have something else wrong in the code. The first one is correct and should work with any reasonable compiler. How do you think the compiler would compile itself if it couldn't cope with semicolons in quotes? It is kind of an important separator in the parser, so there will be more than one place doing something like:
--Code:if (ch == ';') ...
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.