The Database Managers, Inc.

Contact The Database Managers, Inc.

Use an RSS enabled news reader to read these articles.Use an RSS enabled news reader to read these articles.

DataFlex Decompiler

Recent Updates to our Web Site

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 for allowing me to use this CSS trick.

Saving to a Default Folder updated:
The solution for changing the default directory has been updated to use CB2010.

Three Jugs Solution Updated:
The Three Jugs Solution that I posed on the C++ Job Interview Answers page has been updated. A reader, Kang Zhao, provides a solution from his unique perspective.

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 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.

November 2006:
OPT 3.19 Command Line Parser Open Source Library Review:
OPT 3.19 is a command line parsing library for C++ and C programs. It provides an automatically generated user interface, an automatically generated help screen and it can read parameters from files and environment variables and create files using the current set of parameters.

October 2006:
STLplus C++ Open Source Library Review:
This is the first article of the Not Invented Here Open Source Reviews web pages. STLplus is an eclectic collection of STL C++ components. The areas covered in STLplus range from the mundane (trimming strings) to advanced (directed graphs, hash tables and file management).

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.

August 2006:
Connecting a Printer to a USB Port on Windows 2000:
Many significant improvements to the instructions. Added help pages for detecting when the user is an administrator and for opening a Dos Box.

July 2006:
We've completed the first major overhaul of the entire website in many years. 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.

The combo box example web page now includes a live example of the automatically submitting combo box.

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 Custom Icons for Console-Mode Applications, by Curtis Krauskopf 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

Custom Icons for Console-Mode Applications (.htm)
Custom Icons for Console-Mode Applications (.pdf) (2.1 meg)

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__).

Append or Create a Log File Using fopen()
(Added May 15, 2005)
Use fopen to create a file if it doesn't exist and to append to a file if it does exist.

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.

Detect Construction, Destruction, Copy and Assignment:
(Added March 26, 2005)
Detect when C++ data members are being created, copied, assigned and deleted.

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.

Connecting a Printer to a USB Port on Windows 2000:
(Added October 2003)
Detailed step-by-step instructions for connecting a USB Printer to the legacy DataFlex character-mode runtime on Windows 2000.

New DataFlex Information: (Added September 2003)
DataFlex Flexkeys
Finding a Flexkey Definition
DataFlex 2.3 Flexkey Definitions

Added XML and RSS links to support RSS enabled news readers.

New DataFlex Information: (Added August 2003)
Measuring the SET_TIMER Resolution

New DataFlex Information: (Added July 2003)
Timing an Event in DataFlex
How Long Did that Take?
Why is this so Inaccurate?
A Better Timer
Using SYSDATE for Microsecond Timing

New DataFlex Information: (Added June 2003)
DataFlex: An Introduction
DataFlex File Extensions

Timer with 1 second accuracy
Timer with 1 microsecond (or better) accuracy

The Database Managers helps companies to:
  •  become more profitable
  •  grow their business
  •  fix programs that are behaving badly
  •  write new programs to solve business problems
  • do more with fewer resources
Email them at to find out how to make your company more successful.
Services | Programming | Contact Us | Recent Updates
Send feedback to: