New Compiler

Can anyone please help me to get best compiler?
C++ language tutorials are really helpful. But programs are not at all running in my 'Borland's turbo c++ v4.5'
to run those programs everytime I have to make some changes in those programs...
I am new to C++.
Last edited on
I started of with Visual Studio 2010
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express
But I later switched to Visual Studio 2008
http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express
I like both but Visual Studio 2008 did not hog so much CPU and compiled much faster than 2010 but 2010 has more features
Try both see which you like best

Thanks mate!!! :)
VS is decent, but has some things that I dislike. I personally use Code::blocks.
I dont know much about it. But I just heard that code::block is IDE nt a compiler...
is it true??
Code::Blocks comes with MinGW (which is a Windows port of GCC) as the default compiler. It's also possible to use Code::Blocks with the Visual C++ compiler.
Right now I am using the MSVC 2010.
and I have written this code:

1
2
3
4
5
6
7
8
9
10
// my first program in C++

#include <iostream>
using namespace std;

int main ()
{
  cout << "Hello World!";
  return 0;
}


After the code is written i clicked on the button named "start without debbuging"
but I am not getting the stable output.
the prompter (output window) is getting closed immediately.
code::block is running perfectly..Thanks guys :)
@snash's second to last post:
Well, that's because Visual Studio isn't smart enough to keep the window open after the program finishes when it's not in debug mode. Using either debug mode or putting in something to prompt for user input would keep it open.

-Albatross
And I think the classic answer would be system("pause"); to prevent the box from closing :P
Here's a better, non-classic answer :)

http://www.gidnetwork.com/b-61.html
Just cut paste this in your program at the end, and #include <limits>

std::cin.ignore( std::numeric_limits <std::streamsize>::max(), '\n');
Now it magically stops until you press enter.
Or you could cin.get() at the end.
It would seem there's already 7 pages of discussion about how to keep the command window open: http://cplusplus.com/forum/beginner/1988/
Albatross wrote:
that's because Visual Studio isn't smart enough to keep the window open after the program finishes when it's not in debug mode

Can you clarify what you mean by "debug mode"? Even in debug configuration, I've never seen VStudio keep the window open, and I would love to know what I'm doing wrong ;)
Topic archived. No new replies allowed.