New Compiler

Aug 22, 2011 at 4:01am
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 Aug 22, 2011 at 4:23am
Aug 22, 2011 at 4:43am
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

Aug 22, 2011 at 4:49am
Thanks mate!!! :)
Aug 22, 2011 at 5:21am
VS is decent, but has some things that I dislike. I personally use Code::blocks.
Aug 22, 2011 at 5:25am
I dont know much about it. But I just heard that code::block is IDE nt a compiler...
is it true??
Aug 22, 2011 at 6:22am
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.
Aug 22, 2011 at 7:49am
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.
Aug 22, 2011 at 9:01am
code::block is running perfectly..Thanks guys :)
Aug 22, 2011 at 9:46am
@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
Aug 22, 2011 at 9:48am
And I think the classic answer would be system("pause"); to prevent the box from closing :P
Aug 22, 2011 at 10:27am
Here's a better, non-classic answer :)

http://www.gidnetwork.com/b-61.html
Aug 22, 2011 at 2:25pm
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.
Aug 22, 2011 at 3:42pm
Or you could cin.get() at the end.
Aug 22, 2011 at 4:04pm
It would seem there's already 7 pages of discussion about how to keep the command window open: http://cplusplus.com/forum/beginner/1988/
Aug 22, 2011 at 4:23pm
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.