title: Generate random long number
body: <p>I know that to generate random long number, I do following steps in Java:</p>
  
  <pre><code>Random r = new Random();
  return r.nextLong();
  </code></pre>
  
  <p>What will be equivalent of this code in C++? like this? </p>
  
  <pre><code>return (long)rand();
  </code></pre>