Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unterminated character constant

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

when i compile myfile.cpp i get the error
"myfile.cpp:462:unterminated character constant"

I can insert errors in my code(like ommiting a ";") , the compilator doesn't see anything! I'm always said the same message. If i insert a new line, the error will be

"myfile.cpp:463:unterminated character constant"

This is the only error i get but i'm sure there are others because my program is big...

Can you help a poor girl.

ryselenn
 
Look for all the ' (single quote) character in your code and if it is the start of a character constant check you put another ' at the end of the constant.
 
Ryselenn,

Somewhere in your code (prior to line 462) you've attempted to use or define a character constant i.e a quoted string.

It seems you forgot to close the quotes.

The compiler has taken everything from this point on to be part of the quoted string until it reaches a point at which it realises that the quotes never close and gets upset.

Some compilers are helpful enough to guess at where you started the intended string.

The opening quote may be a lot earlier on in your code. You'll just have to look carefully through I guess.

The method of inserting errors could work. If you insert an error before the quotes are opened the compiler will come accross this first and flag the error.

Hope this helps.

MB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top