changing malloc to new causes error
<p>There is a code at  <a href="http://sequitur.info/sequitur_simple.cc" rel="nofollow">http://sequitur.info/sequitur_simple.cc</a></p>

<p>I changed the <code>malloc</code> and <code>free</code> lines </p>

<pre><code>R = (rules **) malloc(sizeof(rules *) * num_rules);
free(R);
</code></pre>

<p>to <code>new</code> and <code>delete</code></p>

<pre><code>R = (rules **) new(sizeof(rules *) * num_rules);  //ERROR
delete(R);
</code></pre>

<p>However <code>g++</code> shows this error:</p>

<pre><code>error: expected type-specifier before â;â token
error: invalid conversion from âlong unsigned intâ to âvoid*â [-fpermissive]
/usr/include/c++/4.6/new:103:14: error:   initializing argument 2 of âvoid* operator new(std::size_t, void*)â [-fpermissive]
</code></pre>
