for Visual C++ v6.0
Before you can do graphics, you need to do some code library installation.
Download the following zip file:
.
(NOTE: This is a local copy; the original can be found at http://www.horstmann.com/ccc/ccc3e.zip)
Unzip these files in a reasonable spot on your hard drive.
Create a new project, and make a Win32 Application, Empty Project. DO NOT MAKE A "CONSOLE" PROJECT.
Add the cccfiles directory to the include path. To do this, choose "Options..." from the "Tools" menu, then click the "Directories" tab. Click in the blank space at the bottom of the list of directories (we did NOT design this user interface), and as if by magic, a box will appear with "..." appearing in it (see figure below). Click the box, and maybe candy will come shooting out of your computer's serial port. No? Well, then navigate to the place where you unzipped the Horstmann code library, and click on the cccfiles directory. Then hit OK as many times as needed to be gone with the whole mess.


Think you're done? Don't you wish! Add ccc_msw.cpp and ccc_shap.cpp to the project (also ccc_msw.h and ccc_shap.h), by clicking on Project -> Add to Project -> Files, and selecting these files.

Now comes one of those fun parts where you get to change someone's carefully crafted code libary. (This tip comes from Horstmann's FAQ):
Open ccc_msw.cpp and "add a line
namespace std {}
above the using namespace std; directive."
Fortunately, this is a one-time setup step.
Now, create a new source file and add it to the project.
#include "ccc_win.h"
int ccc_win_main()
{
Point p(1, 3);
cwin << p << Circle(p, 2.5);return 0;
}
Compile and run your program. If you're lucky, all goes well, you should
produce a graphics window with the following output:
