Sublime Forum

HELP! my c++ file is not running

#1

‘g++’ is not recognized as an internal or external command,
operable program or batch file.
[Finished in 69ms]
This is being displayed when I am running my code please help.
I am currently using sublime text 4.
And also I am very very new to c++ and the sublime ecosystem

0 Likes

#2

i have entered this simple calculator code

#include <iostream>
using namespace std;

int main()
{
	int num1; //will hold the first input
	int num2; //will hold the second input
	int sum; //will hold the sum

	cout<<"Please enter two numbers seperated by a space:"<<endl;
	cin>>num1>>num2;

	sum= num1 + num2;

	cout<<num1<<"+"<<num2<<"="<<sum<<endl;

	return 0;
}
0 Likes

#3

Sounds like you don’t have gcc/g++ installed.

0 Likes