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.
C++
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
Windows
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.
December
2009: SourceCafe
Review Archived:
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.
Bullseye
Error Reporting:
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
questions.
Full
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.
July 2006:
We've completed the first major overhaul of the entire
website in many years. www.decompile.com now uses Google's
AdSense and Google's search on many of our web pages.
Almost all of the site's web pages were updated, and
small changes (and some large ones) were made to reflect
the changes in the database and C++ programming industries.
Defining
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.
June 2006:
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.
November 2005:
Tim Johnston provided information about using the __LINE__
directive on a Microsoft Visual Studio compiler. His
tip has been added to the Using
__FILE__ and __LINE__ to Report Errors article.
June 2005:
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:
Using
__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__).
FindFirst
and FindNext Directory Listing Example
(Added April 20, 2005)
An example program shows how to use findfirst and findnext
to drill into directories using user-specified attribute
filters.
Create
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.
Log
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.
A
Windows API Lookup Tool:
(Added March 30, 2005)
A tool to make it easier for VDF (Visual DataFlex) programmers
to create Windows API calls.
Loan
Payment Calculator:
(Added March 26, 2005)
A DataFlex solution of the classic problem of finding
the monthly payment for a loan.
Read
a file into a string vector:
(Added September 2004)
This code snippet (actually a small program) shows how
to read an entire file into an STL vector.
New
DataFlex File Extensions: (Added February
2004)
Added new file extensions to the list of DataFlex file
names.
Compiling
DataFlex Programs (article): (Added October
2003)
A step-by-step guide to compiling DataFlex programs.
DataFlex
File Extensions: (Added October 2003)
Added more information about the common DataFlex file
extensions.