In need of some basic help in C++ [not a teach me to make hack request]
Hi, i decided i wanna start learning C++ today.
I Found a great Tutorial on here with a list of guides/books...
..well i'm using the Micro$oft beginners book
and i've come to a snag in my programming...
i'm using C++ Express 2008
and when i build the solution it succeeds, but when i run the program it opens and then closes suddenly..
i've done everything that the books says..
i'm up to doing Input in Variables with a keyboard..
i have it set to release not debug...
I Found a great Tutorial on here with a list of guides/books...
..well i'm using the Micro$oft beginners book
and i've come to a snag in my programming...
i'm using C++ Express 2008
and when i build the solution it succeeds, but when i run the program it opens and then closes suddenly..
i've done everything that the books says..
i'm up to doing Input in Variables with a keyboard..
Code:
/*
An interactive program that computes
the area of a rectangle
*/
#include <iostream>
using namespace std;
int main()
{
int length; // this declares a variable
int width; // this declares another variable
cout << "Enter the length: ";
cin >> length; // input the length
cout << "Enter the width: ";
cin >> width; // input the width
cout << "The area is ";
cout << length * width; // displays the area
return 0;
}


were made before Windows Vista, where the console window would usually stay open. So there was no need to specify, hence they left it out of the books.