0

Given below is my boilerplate/ macros that I use. Whenever I hit compile, compiler of DEV C++11 starts compilation and never completes it. It scans all header files and also shows "Error: #include nested too deeply", but doesn't stop. What can be the fix for this?

#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<math.h>
#include<vector>
#include<set>
#include<map>
#define int long long
#define MOD 1000000007
#define br break
#define rem 500009
#define PI 3.1415926535
#define INF 1e18 
#define ve vector
#define mp make_pair
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define mxe(v) *max_element(v.begin(),v.end())
#define mne(v) *min_element(v.begin(),v.end())
#define bs binary_search

#define ub upper_bound
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define rep(g, i, n) for (int g = i; g < n; g++)
#define rev(g, n, i) for (ll g = n - 1; g >= i; g--)
using namespace std; 
// CODE BEGINS HERE:
void solve()
{



}

 signed main() 
{ 
//#ifndef ONLINE_JUDGE
    //  freopen("input.txt","r",stdin);
    //  freopen("output.txt","w",stdout);
//#endif
    FAST;
    // int t;
    // cin>>t;
    // while(t--)
        solve();
    return 0; 
} 





// sometimes I believe compiler ignores all my comments
itskarad
  • 105
  • 1
  • 9
  • if you dont include bits/stdc++.h , does anything change? – pacukluka May 13 '20 at 02:51
  • @LukaKostic Nope – itskarad May 13 '20 at 02:52
  • 1
    Does the C++ version of `` make a difference from the C version of ``? Otherwise, a [mcve] may be useful. – Eljay May 13 '20 at 03:01
  • 1
    It looks like you are being sucked into a cargo cult and they are corrupting you into a force for evil. `#include` includes the entire C++ Standard Library. That makes the rest of the includes unnecessary. [That said, don't `#include`](https://stackoverflow.com/questions/31816095/why-should-i-not-include-bits-stdc-h). The next couple dozen lines are nothing but pain. Five bucks says your problems all go away if you stop trying to encrypt your code. – user4581301 May 13 '20 at 03:44
  • I never would have thought in my life I would see a `signed main` – Imanpal Singh May 13 '20 at 04:13
  • Virtually every line in that program is a bad idea. Learn C++ from someone / somewhere other than whom you've been using so far. – rsjaffe May 13 '20 at 04:17

1 Answers1

3

Use int main or void main instead of signed main(). Either dont #define int as long long or use void main

user9559196
  • 157
  • 6