From: "Andrew D. Jones" Newsgroups: comp.os.msdos.djgpp Subject: Re: Follow up to 'Rookie question' Message-ID: References: <20001229143310 DOT 08852 DOT 00000352 AT ng-ff1 DOT aol DOT com> X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 46 Date: Sat, 30 Dec 2000 16:29:09 GMT NNTP-Posting-Host: 24.43.195.250 X-Complaints-To: abuse AT home DOT net X-Trace: news3.rdc1.on.home.com 978193749 24.43.195.250 (Sat, 30 Dec 2000 08:29:09 PST) NNTP-Posting-Date: Sat, 30 Dec 2000 08:29:09 PST Organization: Excite AT Home - The Leader in Broadband http://home.com/faster To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On 29 Dec 2000 19:33:10 GMT, tchasiii AT aol DOT com (TCHASIII) wrote: >Some one requested that I post my source code that was giving me trouble. Well, >so far none of them have worked but here is the simplest one: >#include >#include > >int main(int arg, char* pszArgs[]) A perfectly legal, if strange, way of declaring main. Those of us who abhor Windows would write this as: int main(int argc, char *argv[]) >{ > > cout << "This is a test"; > return 0; > exit (0); Why do you have to statements that effectively exit the program? The exit(0); is unnecessary. >} > >The message window at the bottom says: >compiling: tester.cpp >bad command or file name >no errors I can only assume you are using RHIDE? This would lead me to believe that you haven't added the DJGPP/BIN directory to your path. Do that, and ensure that the DJGPP environment variable points to where DJGPP/DJGPP.ENV is located. >And when I try to run I get a window that says: >Program exit code: -1 (0xffffffff) Probably means program not found, since compilation failed. >Thanks for your help! Hai. -- Andrew D. Jones