Schaum's code not working!
<p>I was studying in the famous schaums outline c++ programming book, and i saw something called list initialization - i didn't know that before. </p>

<p>I made a code according to the book, but it raised a lot of compiler errors. I was asking my self where the problem is, so i copied the code from the book, and guess what - it didn't work!</p>

<p>Here's the code:</p>

<pre><code>class Rational {
        public:
                Rational(int n=0, int d=1) : num(n), den(d) { }
                int numerator0 const { return num; }
                int denominator0 const { return den; }

        private:
                int num, den;

};

main()
{
        Rational x(22, 7);
        cout &lt;&lt; x.numerator() &lt;&lt; "/" &lt;&lt; x.denominator() &lt;&lt; endl;

}
</code></pre>

<p>Can you tell me what is wrong here ? Thank you in advance.
P.S. Written by "pros" yeah right...</p>
