title: error: request for member 'q' in 'b', which is of non-class type 'const int'
body: <p>A part of my code,</p>
  
  <pre><code>#include "bits/stdc++.h"
  using namespace std;
  
  typedef unsigned long long ull;
  typedef long long ll;
  
  #define mod 1e9+7
  #define eps 1e-9 
  
  #define mp make_pair
  #define pb push_back
  
  #define x first
  #define y second
  
  
      bool intersect1d(ll l1, ll r1, ll l2, ll r2) {
          if (l1 &gt; r1)
              swap(l1, r1);
          if (l2 &gt; r2)
              swap(l2, r2);
          return max(l1, l2) &lt;= min(r1, r2) + EPS;
      }
  
      int vec(const pair&lt;ll,ll&gt;&amp; a, const pair&lt;ll,ll&gt;&amp; b, const pair&lt;ll,ll&gt;&amp; c) {
          double s = (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
          return abs(s) &lt; eps ? 0 : s &gt; 0 ? +1 : -1;
      }
  
      bool intersect(const seg&amp; a,const seg&amp; b)
      {
          return intersect1d(a.p.x, a.q.x, b.p.x, b.q.x) &amp;&amp;
                 intersect1d(a.p.y, a.q.y, b.p.y, b.q.y) &amp;&amp;
                 vec(a.p, a.q, b.p) * vec(a.p, a.q, b.q) &lt;= 0 &amp;&amp;
                 vec(b.p, b.q, a.p) * vec(b.p, b.q, a.q) &lt;= 0;
      }
  
      struct seg
      {
          pair&lt;ll,ll&gt; p,q;
          seg(const pair&lt;ll,ll&gt;&amp; pr1 , const pair&lt;ll,ll&gt;&amp; pr2)
          {
              p = pr1;
              q = pr2;
          }
      };
  </code></pre>
  
  <p>On compiling this gives the following error</p>
  
  <pre><code>error: request for member 'q' in 'b', which is of non-class type 'const int'
              vec(b.p, b.q, a.p) * vec(b.p, b.q, a.q) &lt;= 0;
  </code></pre>
  
  <p>What is causing this?
  Is there anything wrong with my struct constructor?
   I don't see const int being used anywhere? Any hints would be helpful. Thank you.</p>