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