UGN Security
Posted By: Red Mage Problem with C++ install - 06/28/04 10:57 AM
I've been trying to get C++ to work, but it seems like every version I get doesn't work for the tutorials.. frown I got DevC++ , but it didn't work right. Oh, I've been trying them with this program:

Code
#include <iostream.h>
int main()
{
 cout<<"Hello World!";
 return 0;
}
So anyway, I've tried this on DevC++, DJGPP, Borland C++ and they all give me errors. DJGPP can't find the file no matter what I do (even with a full #include <c:\djgpp\include\iostream.h>, Borland was just being retarded about everything, and Dev worked, but the file didn't run frown
Any ideas..?
Posted By: dashocker Re: Problem with C++ install - 06/29/04 01:43 PM
Post the error messages...
Posted By: Ntd Re: Problem with C++ install - 06/29/04 05:51 PM
all of those compilers are command line compilers meaning you must read the instructions very carefully!! Most likely you didn't import the Linking file correctly. However as dashocker said please post the error.
Posted By: Red Mage Re: Problem with C++ install - 07/03/04 09:19 AM
The problem was there was no error, the exe just didn't do anything.
Posted By: Ntd Re: Problem with C++ install - 07/03/04 12:32 PM
what the.. your code looks fine to me. Did you get a console?
Posted By: dashocker Re: Problem with C++ install - 07/03/04 02:37 PM
If you're compling and then double clicking the .exe it's because the console is opening and closing so fast you can't see it. Try opening a command prompt and running the .exe from there.
Posted By: Red Mage Re: Problem with C++ install - 07/05/04 08:49 AM
ah
Posted By: amorak Re: Problem with C++ install - 08/10/04 03:07 AM
Code
#include <iostream.h>
int main()
{
 cout<<"Hello World!";
 return 0;
}
that code wont work in Dev-C++ because you have used iostream.h instead of iostream (no .h) you can also add cin.get(); just before return 0; that will wait for user input before quiting.
Code
#include <iostream>
using namespace std;

int main()
{
   cout << "Hello world!" << endl;
   cin.get();
   return 0;
}
Posted By: Red Mage Re: Problem with C++ install - 08/13/04 12:50 PM
You're a genius!!
© UGN Security Forum