I just upgraded to VS2008 and it seems I keep getting this very annoying problem, whenever I write a program it works, however at the end when it outputs the answer I can barely see the output but the window instantly closes.
Any ideas?
Edit. my code and output info.
Any ideas?
Edit. my code and output info.
// ******************************************************
//
// SumProduct.cpp
//
// This program prompts the user for two integers then
// outputs their sum and product.
//
// ******************************************************
#include <iostream>
using namespace std;
int main()
{
//
// Variable declarations
//
int num1, num2;
int sum, product;
//
// Read in two integers
//
cout << "Enter an integer: ";
cin >> num1;
cout << "Enter another integer: ";
// --------------------------------
// ----- ENTER YOUR CODE HERE -----
// --------------------------------
cin >> num2;
sum = num1 + num2;
product = num1 * num2;
cout << "The sum is: " << sum << endl;
cout << "The product is: " << product;
// --------------------------------
// --------- END USER CODE --------
// --------------------------------
cout << "The end!!!\n";
return 0;
}
'Chapter1.1.exe': Loaded 'C:\Users\Nrg\Documents\Visual Studio 2008\Projects\Chapter1.1\Debug\Chapter1.1.exe', Symbols loaded.
'Chapter1.1.exe': Loaded 'C:\Windows\System32\ntdll.dll'
'Chapter1.1.exe': Loaded 'C:\Windows\System32\kernel32.dll'
'Chapter1.1.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcp90d.dll', Symbols loaded.
'Chapter1.1.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcr90d.dll', Symbols loaded.
The program '[1596] Chapter1.1.exe: Native' has exited with code 0 (0x0).