C++ Initialising fields directly vs initialisation list in default constructor : <p>I'd like to know if there is a difference between this code:</p>

<pre><code>class Foo{
 private:
    int a = 0;
 public:
    Foo(){}
}
</code></pre>

<p>And:</p>

<pre><code>class Foo{
 private:
    int a;
 public:
    Foo(): a(0) {}
}
</code></pre>

<p>And, if so, which should be preferred?
I know it's preferable to use an initialiser list than assigning in the constructor body, but what about initialiser list vs directly initialising in field declaration (for primitive types, at least, as is the case here)?</p>

<p>Also, what of the case below:</p>

<pre><code>class Foo{
 private:
   int a = 0;
 public:
   Foo(){}
   Foo(int i): a(i) {}
}
</code></pre>

<p>When the non-default constructor is called: is "a" initialised twice, first to 0 then to "i", or directly to "i"?</p>
