How to setup up Input-Output in Sublime

How to setup up Input-Output in Sublime

you can use this sample code

to connect files freopen() is used

Suggestion Video : Setup Sublime Text

#include<iostream>
using namespace std;
int main(){

	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);

	int n;
	cin>>n;

	int arr[1000];

	for(int i=0;i<n;i++)
		cin>>arr[i];

	for(int i=0;i<n;i++)
		cout<<arr[i]<<" ";


	cout<<"hello World";
}

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.