Run small scripts in CMD?

So basically I'm learning from an app on the mobile where they create and learn c++. The thing is, the person makes for example an basic calculator and I just wanted to do the same to try it out but I can't seem to find a program that I can use so the script will run in CMD.

I do have notepad + and Visuals

This is the script

#include <iostream>

using namespace std;

int main()
{
int a;
int b;
int sum;

cout << "enter a number \n";
cin >> a;

cout << "enter a number\n";
cin << b;

sum = a + b;
cout << "calculated to" << sum << endl;

return 0;

}
C++ is not a scripting language. You will have to compile the program you have using, for example, your Visual Studio IDE. Then you can run the resulting executable file from the command line.

Try making a new empty project in VS and adding the code you have. If you have trouble, post again.
Topic archived. No new replies allowed.