REVIEW - Starting with Microsoft Visual C++


Title:

Starting with Microsoft Visual C++

Author:

Charles Wright

ISBN:

076153444

Publisher:

Prima ()

Pages:

594pp

Reviewer:

Francis Glassborow

Reviewed:

August 2001

Rating:

★☆☆☆☆


Look carefully at the title. Definitely this is not a book for anyone who can already program with any fluency in any procedural language - they would be bored out of their minds very quickly. The pace is slow to start with and when we get on to more demanding aspects of C++ the coverage is shallow. If you have never programmed before and have bought a version of Visual C++ and want to get started this book will do at least that much for you. But it will not introduce you to generally good, modern, idiomatic C++. Let me give you an example. One of my standard tests of books written for novices is to look at how the author handles copying. I looked in the index for 'copy', nada. I looked under constructor, no mention of copy. I carefully read chapter 23, 'Understanding Constructors and Destructors'. If I was a normal reader I would still not even know that there was such a thing as a copy constructor.

So I had a look for assignment. Here I was luckier because the index took me to page 534 (note that the text of the book ends on page 575). Let me show you the assignment operator provided on page 537 (see box):

const CEmployee& CEmployee::operator=(const CEmployee&Old)
{
// Make sure the employee name variables are empty.
// These should have been set to NULL in the constructor
// but you may be reusing an existing class object.
delete[] m_EmployeeFirst;
delete[] m_EmployeeLast;
// Reallocate memory for
// the names
m_EmplyeeFirst = new char [strlen(Old.m_EmployeeFirst) + 1];
m_EmplyeeLast = new char [strlen(Old.m_EmployeeLast) + 1];
strcpy(m_EmployeeFirst, Old.m_EmployeeFirst);
strcpy(m_Employeelast, Old.m_EmployeeLast);
m_EmployeeID = Old.m_EmployeeID;
return (*this);
}

The author has clearly never been anywhere near a respectable book on C++. He remembers to use the right version of

delete
, and his return type is arguable though most experts advise that you return a plain reference. The parameter name is weird. All those things are purely idiosyncratic. The fact that he completely ignores the STL and usually uses C Library tools in preference to C++ ones says something about his heritage. However the failure to use either the old idiom for copy assignment nor the newer exception safe alternative is inexcusable.

The author's coverage of Visual Studio leaves much to be desired. That could be forgiven if he gave a correct introduction to C++, even an archaic one suitable for use with VC++ 1.0. He does not. I think reading this book will make learning C++ harder. This book is dangerous in that it re-enforces ignorance. Sadly, the author is blissfully unaware of the level of his ignorance, however those responsible for publication should not have been.

As far as I am concerned, the final nail in this book's coffin is the complete lack of any exercises or examples to be done by the reader. A book of 'lessons' without homework is like a reference book without an index - just about useless for the purpose that it claims to serve.


Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.