470,849 Members | 659 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

Re: C newbie problem

On Jun 28, 7:01 pm, tom <nos...@nospam.invalidwrote:
Hi -
Hi
>
I'm just starting to learn C and I'm trying to compile a first hello
world program. Unfortunately when I press the compile button it doesn't
work. Can anyone give me any advice?
Yes. Just any advice or something in particular?
>
Thanks!

~tom
Put your signature at the bottom of your post not in the middle.
Problem code follows:

(helloworld.c)
<snip code>
// 1 and 2 above on a medium customarily used for software
interchange; or,
There's your problem, intercharge is not defined anywhere. nor 'or'.
(iso646.h is not included)
<snip>
// this License, you may choose any version ever published by the Free
Software
'Software' is not defined anywhere.
<snip>
// 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY
'WARRANTY' is not defined anywhere.
<snip>
// PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED
'EXPRESSED' is not defined anywhere.
<snip>
// 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING
'WRITING' is not defined anywhere.
// REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
DAMAGES,
'DAMAGES' is not defined anywhere.
// INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING
'ARISING' is not defined anywhere.
// YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
OTHER
'OTHER' is not defined anywhere.
// free software which everyone can redistribute and change under these
terms.
'terms' is not defined anywhere.
// <one line to give the program's name and a brief idea of what it
does.>
'does' is not defined anywhere. '.>' is a syntax error.
// You should have received a copy of the GNU General Public License
along
'along' is not defined anywhere.
// with this program; if not, write to the Free Software Foundation,
Inc.,
'Inc' is not defined anywhere. '.,' is a syntax error.
// Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type
`show w'.
` is not in the standard C character set. 'show' is not defined
anywhere. 'w' is not defined anywhere. unmatched '.
// The hypothetical commands `show w' and `show c' should show the
appropriate
'appropriate' is not defined anywhere.
// `Gnomovision' (which makes passes at compilers) written by James
Hacker.
'Hacker' is not defined anywhere.
// This General Public License does not permit incorporating your
program into
'program', 'into' are not defined anywhere.
// consider it more useful to permit linking proprietary applications
with the
'with', 'the' are not defined anywhere.
void main()
Change that to int main(void).
{
printf("Hello, world!\n");

}
return 0; is not needed here, as you use // comments, so C99.
Jun 28 '08 #1
0 1326

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by John | last post: by
reply views Thread by Alan Silver | last post: by
2 posts views Thread by James Calivar | last post: by
5 posts views Thread by Dave | last post: by
reply views Thread by Edwin.Madari | last post: by
reply views Thread by Robert Kern | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.