From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Read Me Third: A Short FAQ List Organization: Pin Eight Software Message-ID: <7oUXONJSazygooCyeWwSD8msc766@4ax.com> References: <0A02668AA6DAF2EA DOT B7324B0997533B2E DOT A43653802EA26ABD AT lp DOT airnews DOT net> X-Newsreader: Forte Agent 1.6/32.525 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 39 X-Trace: /b/VKTeVvGk6o7ymB1MNX2BsZVprlHbnvKwgQuiaBCBsvRymzYCrhAKM0Muhoseh0tiWoalf1HdU!jDt5xfDyzd2gQs5TB427sooXgCCog1sh4mEsn1xHFPUYYYCQd5JwYitvktc7RMznkA== X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Thu, 28 Oct 1999 00:11:22 GMT Distribution: world Date: Thu, 28 Oct 1999 00:11:22 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Wed, 27 Oct 1999 18:50:31 -0400, Rodeo Red wrote: > This is my current version of Hello.cpp: > > #include Problem #1: is the old way. #include > int main (void); Problem #2: A prototype for a function should have a following ; but the function definition should not. int main(void) > { > cout <<"Hello world!\n"; Problem #3: The function returns an undefined number. return 0; > } > > I believe this declares the main function in the correct way . However, when I tru > to compile it this does not create an hello.o program as it should. I get: : > > C:\djgpp>gcc -c -Wall hello.cpp > hello.cpp:4: parse error before `{' Problem #2. -- Damian Yerrick Mail me from the link on my web site: Pinocchio's Brother