Before you begin converting your C code to C++, make sure your C code is as clean as possible. Then use the MFC migration tool to examine the migration issues for your program.
Using your current project and source files, be sure you can build and run your program with a very high warning level. Consider using the /W3 and /WX compiler flags. The /W3 flag specifies a high warning level. The /WX flag gives you errors, not just warnings, on any dubious code in your program.
Tip In Visual C++ 2.0, set the Warning Level and Warnings as Errors options on the C/C++ tab in the Project Settings dialog box. In Visual C++ 1.5 and earlier, set these options in the Custom Options category under C/C++ Compiler Options in the Project Options dialog box. See your C++ documentation.
Figure 3 shows the Visual C++ 2.0 options for setting the /W3 and /WX flags.
You might also want to run your program under the Windows debug kernel. For 16-bit work, you can install the debug kernel through Visual C++ 1.5 Setup.
For the SHOWDIB migration sample, open the existing SHOWDIB C-language project on the distribution diskette (or your Visual C++ installation). Set the compiler flags and compile. Fix any errors.
At this point, your code should be as clean as possible and ready for conversion to C++.