Mail Archives: djgpp/1999/08/23/15:32:11
Daryl Zero (Wobbler AT greenvillenc DOT com) wrote:
: #include <stdio.h>
:
: void main()
^^^^(1)
: {
: charm me[20];
:
: printf("What is your name?")
: scanf("%s",&me);
: printf("darn glad to meet you, %s!\n,me);
^^^(2)
returrn(0); /* (3) */
: }
:
: I get the error Error: unterminated string or charcter constant
: Error: possible real start of unterminated constant
: There were some error's.
:
: I realise I am an idiot but if you could help me anyway and help me
: understand what is going on it would be greatly appreciated.
There's nothing idiotic about asking questions so you can learn things.
You are missing a '"' at (2). This is what the compiler is telling you.
While you're at it, you really should declare main() to return an
"int" at (1) and adding a "return" at (3) to be ANSI-compliant.
To catch more problems/errors compile with "-Wall".
Furthermore when in doubt about DJGPP first look in the FAQ
(v2/faq*b.zip) then post here if you can't figure it out. There's also
a C FAQ somewhere (sorry, don't know where) which could be useful for
a C neophyte.
Pettersson, Symphony 16,
MartinS
- Raw text -