Mail Archives: djgpp/2000/12/30/11:36:32
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<stdio.h>
>#include<iostream.h>
>
>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
- Raw text -