Console closing to soon.

After I press enter after it says enter second number and I do it automatically closes even though I have system("pause"); and im running windows vista 32-bit.


#include <conio.h>
#include <Windows.h>
#include <string>
#include <iostream>

using namespace std;

int main(){
int firstnum, secondnum, answer;
cout << "Hey" << " Dudes" << " Whatsup?" << endl;
cout << "Enter first number: ";
cin >> firstnum;
system("cls");
cout << "Thanks dude." << endl;
cout << "Now enter second number: ";
cin >> secondnum;
system("cls");
answer = firstnum + secondnum;
cout << "The addition of those numbers is: " << answer;
cout << endl << endl << endl;
system("pause");
}
What is that supposed to do.
@ ty98: Please be more specific in your question, are you asking what the link that ciphermagi posted is supposed to accomplish? Or are you asking the OP what they are trying to do?
No the cop. That snowborder7 posted!!!!!!!
No the cop. That snowborder7 posted!!!!!!!


What? What do you mean by "the cop".
@ty98:

The point of the (almost illegible without [code][/code] brackets) program is to accept 2 integers from the user, and print the sum of the input.
Topic archived. No new replies allowed.