>>meanwhile the main problem is finding out how to include the header file
But the code you posted does it correctly #include <iostream> is all that is needed. The the compiler starts reading your program the #include statement causes it to open up the include file and add its contents to the *.cpp file that is being compiled. That is part of the preprocessor operations.
You are probably getting compile error messages on pen.h because you forgot to add using namespace std; after including <string> or you can use std::string Brand; to declare the namespace.
Last edited by Ancient Dragon; Sep 29th, 2008 at 11:34 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,950 posts
since Aug 2005