<div class="gmail_quote">On Mon, Apr 30, 2012 at 9:42 AM, Wenlong Wang <span dir="ltr">&lt;<a href="mailto:scc.wwl@gmail.com" target="_blank">scc.wwl@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

It is a regular console application. It goes like<br><br>#include &lt;vtkxxx.h&gt;<br>//.............<br>//---------- Include headers -----------------<br><br>vtkPolyData* polydata = vtkPolyData::New();    // here pops the error<br>


//............ <br><br>void main()<br>{<br>     //.........................................<br>}<br></blockquote><div><br></div><div><br></div>New() is a function. You can&#39;t call a function outside of a scope like you have done there in c++. For example, this doesn&#39;t compile either:</div>
<div class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_quote">void MyFunction() {}</div><div class="gmail_quote"><br></div><div class="gmail_quote">MyFunction(); // You can&#39;t do this</div><div class="gmail_quote">
<br></div><div class="gmail_quote">int main()</div><div class="gmail_quote">{</div><div class="gmail_quote">  return 0;</div><div class="gmail_quote">}</div><div><br></div><div><div>My compiler says &quot;error: expected constructor, destructor, or type conversion before ‘;’ token&quot; - I would expect yours says something more than &quot;access conflict&quot; as well.</div>
</div><div><br></div>
David<br></div>