Hi,
1. if you easily get annoyed at stupid questions, don't read on
2. I'm using dev-c++ + mingw. I was trying to keep the windows of my console apps open using cin.get(); but in most of the cases it didn't work. Sometimes it did, but I don't really see why (it's _not_ because of some silly syntax error or something, i'm sure). I'm using system("pause >nul"); instead, and it works fine, though I know it isn't very elegant.
3. I've written a small program to demonstrate this (inspired by PublicAutopsy, hehe ):
I don't know what's wrong with it, it works fine except the cin.get line. Any guesses?Code:#include <iostream> using namespace std; int main () { int password; do { cout << "Enter password: "; cin >> password; cout << "\n"; } while (password!=12345); cout << "Password OK."; cin.get(); return 0; }