This is the forum to discuss the Wrox book Professional C++, 2nd Edition by Marc Gregoire, Nicholas A. Solter, Scott J. Kleper ; ISBN: 978-1-1181-6995-7
You are currently viewing the BOOK: Professional C++, 2nd Edition section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
What is the advantage of providing an explicit default constructor to set the data value of the StringSpreadsheetCell to "#NOVALUE" as opposed to using the compiler generated default constructor which will set the initial value to the empty string?
That's just for this example.
In my spreadsheet example, I want to make a difference between having no value and having an empty string as value, hence the "#NOVALUE" sentinel.