I have both Code::Blocks and Dev-C++
I use them alternatively, and it's been doing fine.
Okay, here's the main question:
Which is better to use... cin.get(); or system("pause");?
cin.get() is good because it doesn't show messages like Press any key to continue... But sometimes, even if I put the code there, it just simply closes the program.
system("pause") on the other hand, even though it shows that annoying message, works always. But it gets ugly if I use this.
Does anyone know why cin.get() sometimes doesn't work?
I believe the proper way to use cin is as follows:
1 2
std::cin >> x;
cin.ignore();
I don't use cin much, if at all, and when I do, Code::Blocks has a feature that you don't need system("pause"); or cin.get(); at the end of the program, it pauses it for you with information about your code.
I also don't understand why you still use Dev-C++ I believe it hasn't been updated for over 5 years now.
I don't want to force you to do something you don't want to do, and I personally grew up with BloodShed and Borland. For all I care, you can use no IDE's at all. I've gone through a good bit of the bigger ones and I'm content with Code::Blocks, it just needs an update, I might try a nightly build from the forums.
The Code::Blocks console runner automatically give you the return value, time it took to run and pauses when you run the project from withing the IDE. I love this feature.