[Logo]
Forums Register Login
unclosed character literal
Hi ,

I have following char[] array (partially reproduced:



The problem is that my compiler (NetBeans) gives an ' unclosed character literal' error for the values 096 and 097, but not 100 and 101.

Any idea why ?

Regards
Hi,

I don't see a comma after your 'A' in your array definition. I would check this first.
Hi,

that was just a typo error when entering the message. It is correct is my Editor .

I have the impression that NetBeans is wrong here. Can someone else try this in another editor ?

Stefan
I think that you cannot have the digits 8 or 9 as part of the char that you are defining.

For ex. '\107', '\777', 'A', 'E', 'Z' are valid values ... but '\108', '\901' are not.
I also don't see a closing semicolon to end the statement. Plus, the format for the characters should be Unicode:



To use Octal:


[ October 25, 2004: Message edited by: Jeff Bosch ]
Hi, thanks for the solution.
Bring out your dead! Or a tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss


This thread has been viewed 18641 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jul 19, 2018 13:00:15.