I have been going through C++ Primer Plus and I am working on the programming challenges in it using Visual Studio Code since there were weird issues with Visual Studio 2017. I have looked at a lot of other similar posts but the solutions there don't work for me. For example I tried putting a breakpoint at the main() function's closing curly brace, putting in cin.ignore() at the end before return 0. But none of that works. Here is the code.
#include <iostream>
using namespace std;
int main() {
int inInput;
cout << "Enter your height in inches." << endl;
cin >> inInput;
int feet = inInput/12;
int inches = inInput%12;
cout << feet << inches << " is your height." << endl;
cin.ignore();
return 0;
}
Edit:
Tried the solution that this was marked as a duplicate of and it didn't work.