This is my code:
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main () {
int n, x, distress=0, z;
char y;
cin >> n >> x;
for (int i=0; i<n; i++) {
cin >> y >> z;
if (y=='+') {
x+=z;
}
if (y=='-') {
if (x>=z) {
x=x-z;
}else{
distress++;
}
}
}
cout << x << " " << distress;
return 0;
}
It runs well on an online compiler but when I run it using Sublime Text 3 CPPFastOlympicCoding package it gives me this error:
ld: file not found: Ice
collect2: error: ld returned 1 exit status
I am not sure how to fix this, btw I am using an M1 mac if that matters.