Mail Archives: djgpp/1999/08/23/11:42:34
From: | DavMac AT iname DOT com (Davin McCall)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: I'm so new it's frustrating. Almost ready to lose my will to learn.
|
Date: | Mon, 23 Aug 1999 13:20:14 GMT
|
Organization: | Monash Uni
|
Lines: | 39
|
Distribution: | world
|
Message-ID: | <37c14937.12493645@newsserver.cc.monash.edu.au>
|
References: | <1rbw3.17368$x04 DOT 1147413 AT typ11 DOT nn DOT bcandid DOT com>
|
NNTP-Posting-Host: | damcc5.halls.monash.edu.au
|
X-Trace: | towncrier.cc.monash.edu.au 935414357 16585 130.194.198.138 (23 Aug 1999 13:19:17 GMT)
|
X-Complaints-To: | abuse AT monash DOT edu DOT au
|
NNTP-Posting-Date: | 23 Aug 1999 13:19:17 GMT
|
X-Newsreader: | Forte Free Agent 1.1/32.230
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
On Mon, 23 Aug 1999 08:40:32 -0400, "Daryl Zero"
<Wobbler AT greenvillenc DOT com> wrote:
>I get the error Error: unterminated string or charcter constant
> Error: possible real start of unterminated constant
> There were some error's.
Well, a string in C is represented by text between two double-quotes.
ie, in:
printf( "hello!" );
the "hello!" part is a string. The first double quote begins the
string, the second one ends it (that is without going into details
that could be confusing at this stage).
[likewise a character constant is a single character between two
single-quotes]
So: "Error: unterminated string or character constant" means that you
have left the double-quote off the end of a string, or the
single-quote off the end of a character constant. Checking through
your source I find:
printf("darn glad to meet you, %s!\n,me);
Which is indeed missing a double quote character. It should read:
printf("darn glad to meet you, %s!\n",me);
Incidentally, the message: "possible real start of unterminated
constant" usually has a line number with it, which may give an
indication of where the suspect string is in your source file.
Davin.
__________________________________________________________
*** davmac - sharkin'!! davmac AT iname DOT com ***
my programming page: http://yoyo.cc.monash.edu.au/~davmac/
- Raw text -