I am new to C++ and didn't recognize the syntax used in the Employee constructor on page 39, but I shrugged and just assumed that was the weird way C++ did things. Then I got to page 42 and saw the type of syntax I'm more used to (e.g., from Java) for the Database class. Why is one syntax used on page 39 and another used on page 42?
[Edit: It occurs to me I might get a reply quicker if I don't make people run from their books, so the code snippet from page 39 is:
Code:
Employee::Employee()
: mFirstName("")
, mLastName("")
, mEmployeeNumber(-1)
, mSalary(kDefaultStartingSalary)
, bHired(false)
{
}
And the code snippet from page 42 is:
Code:
Database::Database()
{
mNextEmployeeNumber = kFirstEmployeeNumber;
}