I have recently installed sublime text 3 on my pc and trying to run some c++ code on it , it is giving me the following error, could someone please help, thanks for your time. I have put my cpp code and the error appearing:
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define endl "\n"
ll mod=1000000007;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int main()
{
IOS;
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ll t;cin>>t;while(t--)
{
ll a;
cin>>a;
cout<<a+2;
}
}
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../libmingw32.a(main.o):(.text.startup+0xc0): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
[Finished in 0.3s with exit code 1]
Aucun commentaire:
Enregistrer un commentaire