Preferred C++ compiler for Windows

Preferred C++ compiler for Windows

Post by ian_desouz » Sat, 06 Dec 2003 02:38:29


I have 15+ years of experience programming. 8 from the Unix C++ world,
and 7 in the Java (mainly windows) world. I can't get the following
program to create an executable in Microsoft Visual C++.

#include <iostream.h>

int main(int argc, char* argv[])
{
cout << "hello" << endl;
}

I want to non-windows specific code in my emacs editor...

Any suggestions as to a free easy to use compiler would be helpful...

Ian
 
 
 

Preferred C++ compiler for Windows

Post by Victor Baz » Sat, 06 Dec 2003 02:44:15

"Ian deSouza" < XXXX@XXXXX.COM > wrote...

#include <iostream>


std::cout << "hello" << std::endl;


Look for MinGW (it's a flavour of GCC, IIRC). Comes as part of
"Dev-C++" IDE.

Victor

 
 
 

Preferred C++ compiler for Windows

Post by Xeno » Sat, 06 Dec 2003 02:47:30


Stardard C++ headers no longer use the .h. And its really bad with VC++,
because you get the old, non-templatized versions which don't work with STL.
Plus, you need either a "using namespace std" line or prepend "std::" to
your cout and endl, since they are in the "std" namespace.

DrX
 
 
 

Preferred C++ compiler for Windows

Post by red floy » Sat, 06 Dec 2003 03:15:42


#include <iostream>
using namespace std;
 
 
 

Preferred C++ compiler for Windows

Post by Derek Bake » Sat, 06 Dec 2003 10:14:10


It *can* come as part of Dev-C++, which is how I use it. But it is available
standalone, and there are other IDEs for it.

--
Derek