Class construction with initial values
<p>I'm new to C++, and the whole idea of classes - I'm still reading a book to try and learn. The book I'm reading says that when I construct a class, I can assign default values by doing this:</p>

<pre><code>class foo {
public:
   foo(char c, int i);
private:
   char exampleChar;
   int exampleInt;
};

foo::foo(char c, int i):
exampleChar(c),
exampleInt(i)
{}
</code></pre>

<p>This code (to me) looks very messy, and doesn't follow rules that I'm used to in other languages. <strong>My question is, what's the difference between doing the above, and this (below, which I personally think looks a lot cleaner)?</strong></p>

<pre><code>foo::foo(char c, int i) {
   exampleChar = c;
   exampleInt = i;
}
</code></pre>

<p>Sort of things I'm thinking about are: are there performance/efficiency issues if done on a large scale - or is it exactly the same?</p>
