C++ -- Which one is supposed to use "new Car" or "new Car()"?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/620137/do-the-parentheses-after-the-type-name-make-a-difference-with-new">Do the parentheses after the type name make a difference with new?</a>  </p>
</blockquote>



<p>Hello all,</p>

<pre><code>class Car
{
public:
    Car() : m_iPrice(0) {}
    Car(int iPrice) : m_iPrice(iPrice) {}

private:
    int m_iPrice;
};

int _tmain(int argc, _TCHAR* argv[])
{
    Car  car1;    // Line 1
    Car  car2();  // Line 2, this statement declares a function instead.

    Car* pCar = new Car; // Line 3
    Car* pCar2 = new Car(); // Line 4

    return 0;
}
</code></pre>

<p>Here is my question:</p>

<p>When we define an object of Car, we should use Line 1 rather than Line 2.
When we new an object, both Line 3 and Line 4 can pass the compiler of VC8.0.
However, what is the better way Line 3 or Line 4? Or, Line 3 is equal to Line 4.</p>

<p>Thank you</p>
