Problem with C++ install

Posted by: Red Mage

Problem with C++ install - 06/28/04 11: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.. 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 , Borland was just being retarded about everything, and Dev worked, but the file didn't run
Any ideas..?
Posted by: dashocker

Re: Problem with C++ install - 06/29/04 02:43 PM

Post the error messages...
Posted by: Ntd

Re: Problem with C++ install - 06/29/04 06: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 10: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 01: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 03: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 09:49 AM

ah
Posted by: amorak

Re: Problem with C++ install - 08/10/04 04: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 01:50 PM

You're a genius!!