im learning c++ using a book i got from the library and i have a question about it
Code:
// using const.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
const int inches_per_foot = 12;
const int feet_per_yard = 3;
int yards = 0;
int feet = 0;
int inches = 0;
cout << "Enter a length as yards, feet, and inches: ";
cin >> yards >> feet >> inches;
cout << "\nLength in inches is " << inches + inches_per_foot * (feet + feet_per_yard * yards) << "\n\a";
return 0;
}
im using microsoft visual c++ 2008 and whenever i debug the program it closes before i see the output, is there a thing that i should change so that it doesnt close without user input