title: 'make_pair' cannot be used as a function
body: <p>This is my complete code:</p>
  
  <pre><code>  #include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;bits/stdc++.h&gt; 
  
  using namespace std;
  #define ff first
  #define mp make_pair
  
  #define ss second
  
  
  int main(void) {
  
      int m;
      vector &lt;string&gt; grid;
  
      cin &gt;&gt; m;
  
      pair &lt;int,int&gt; foo;
   pair &lt;int,int&gt; bar;
  
  
  // bar =make_pair (10.5,'A');
  foo = make_pair (1,2);
  cout&lt;&lt;foo.ss&lt;&lt;endl;
      for(int i=0; i&lt;m; i++) {
          string s; cin &gt;&gt; s;
          grid.push_back(s);
          int pp = s.find('p');
          int mp = s.find('m');
          if(pp&gt;=0){
            bar = make_pair(pp,i);
          }
        cout&lt;&lt;pp&lt;&lt;endl;
      }
      return 0;
  }
  </code></pre>
  
  <p>This is my error:</p>
  
  <pre><code>prog.cpp: In function 'int main()':
  prog.cpp:40:32: error: 'make_pair' cannot be used as a function
              bar = make_pair(pp,i);
                                  ^
  </code></pre>
  
  <p><code>make_pair</code> gives this error when I placed it inside the for loop, it works completely fine if I place it out. Where am I going wrong?</p>
  
  <p>Edit: I amtrying in codechef ide...these are the inputs</p>
  
  <pre><code>3
  ---
  -m-
  p--
  </code></pre>