in your browser because links to all of the new and changed
pages will be listed here:
March 2010: How
to resolve 'Cannot create pre-compiled header: initialized
data in header' compile-time problems
Pre-compiled headers are one of the most important compiler
features for reducing compilation times. Pre-compiled
headers allow the compiler to reduce the project's overall
compile time because information is reused from previous
compilations. However, initialized data in the header
will cause a W8058 warning and prevent the header from
being precompiled. This article discusses solutions
that code around the W8058 warning and allow headers
to be precompiled without losing any functionality.
FAQ and Tips Pages updated:
Almost all of the pages in the C++ FAQ and tips sections
have been updated. The biggest single update is a new
CSS background that makes the C++ code easier to read.
You can see an example of the new code style on the
Timer API page. In addition to the lines that make
the code easier to read, the style also allows for a
horizontal scroll bar if the code window on the browser
is too narrow. Many thanks to sohtanaka.com
for allowing me to use this CSS trick.
JavaPro Magazine no longer publishes the article I wrote
in July 2003 that reviewed SourceCafe. I have archived
the article at www.decompile.com. SourceCafe is a Java
code generator for SQL database schemas.
The location of runtime errors in C++ programs can be
identified using a simple macro. The macro transforms
an integer into a string at compile-time. It also concatenates
strings at compile-time to generate a single string
with the complete error message.
July 2009: Read
a text file into a vector of strings:
This is an example program that reads itself using the
STL std::copy algorithm. The file is read into a std::vector
of char. This example uses istream_iterator, back_inserter
and the noskipws manipulator to read the file.
August 2008: C++
Interview Questions and Answers:
Unless you're a hobbyist, at some point in your career
you will be interviewed for a software development position.
In addition to knowing the company, knowing their industry,
knowing their products and practicing standard interviewing
questions ("So why do you want to work for us?"), software
engineers are expected to be able to communicate their
knowledge of their art and demonstrate their skills
on demand. Prepare for your next C++ job interview by
reviewing the questions on these pages. Use the questions
that have been grouped into 13 categories to test your
ability to handle typical C++ programming questions
and to handle the extraordinary and unusual programming
Screen MS-Dos Application:
Make a full screen MS-Dos application from a command
prompt icon. This is a tutorial that provides step-by-step
instructions for customizing a command prompt icon.
April 2007: JavaLib
Upgraded to version 1.0.1:
A JavaLib user named Pawel reported two problems in
the JVector class that caused compile-time problems.
One problem was a minor syntax issue and the other was
a missing namespace name. Both problems have been fixed
in the library. The JavaLib library's version has been
upgraded to 1.0.1.
January 2007: JavaLib,
A Java-like C++ Open Source Library:
JavaLib is a small library of Java-like classes written
in C++. The size of the library promotes portability
and maintainability by end-users. For the right project,
JavaLib can be quite helpful in providing containers
that are much simpler to use than the STL but provide
all of the power of template programming.
September 2006: W8059
Structure packing size has changed: The Borland compiler issues a warning: W8059
Structure packing size has changed. This page discusses
the warning, why it happens and how to fix the warning.
an Exception using a Macro
(Added July 20, 2006)
Define a C++ exception using a macro. The article includes
exception examples for Microsoft C++ compilers, for
Borland C++ compilers and GNU compilers.
Emilio Moura provided a tip that checks the MS-Dos ERRORLEVEL
to detect when DFCOMP has compiled with an error. His
tip was incorporated into the Compiling
DataFlex Programs article.
Curtis Krauskopf, the owner of The Database Managers,
Inc., is proud to announce that he has been published
again! This time, it's in the June 2005 special edition
of C++ Builder Developer's Journal. The
special issue is about user-interface development.
His article, "Custom Icons for Console-Mode Applications",
is a tutorial on customizing console-mode icons in Borland's
C++ Builder. It is available for free from www.bcbjournal.com:
__FILE__ and __LINE__ to Report Errors
(Added May 17, 2005)
Create a string that contains the C++ filename and line
number that a runtime error occurs on using preprocessor
directives. Show how to stringify an integer (__LINE__).
a Custom Program Icon for a Console Mode Application:
(Added April 10, 2005)
Modify the default icon for a console-mode application.
The modified resource can have both a 16-bit and a 32-bit
icon. Each console-mode application can have a unique
customized icon. Step-by-step instructions for modifying
the icon are provided.
All Datafile Saves and Deletes:
(Added March 30, 2005)
This module helps a developer discover why records are
being mysteriously deleted or overwritten. It does this
by logging the key fields and other important information
when a specific datafile is saved or deleted. This solution
is only suitable for character-mode DataFlex.
Windows API Lookup Tool:
(Added March 30, 2005)
A tool to make it easier for VDF (Visual DataFlex) programmers
to create Windows API calls.