1. You shouldn't be including a .cpp file in the main.cpp file, you
should be including the .h file.
2. Are those two variables IN the class? Or are they globals? If
they're part of the class structure, you just need to instantiate an
employee. If they're globals, then you're going to have to extern
them into the main.cpp file but that's an unclean way to go about
things.
3. I believe it's common practice to put standard include files
prior to the include files you've created.
HTH.
Watson Davis
On 24 May 2004 at 13:35, Dane Ensign wrote:
> Hi,
>
> Thank you in advance for any help you can offer.
>
> I have three files:
> 1. Employee.h - Class declarations only
> 2. Employee.cpp - class functions only , includes constructor.
> 3. main.cpp - main file.
>
> My Employee.h file declares 2 variables that are string types. My
> Employee.cpp's constructor sets them to A default value. I cant figure
> out the correct location of the include statements. Their placement
> looks incorrect to me and after trying many different combinations I
> still can't fix it. Here is what I have Right now:
>
> Employee.h file
> None.
> Employee.cpp file
> #include "Employee.h"
> #include <iostream>
> Main.cpp file
> #include <iostream>
> #include <stdlib.h>
> #include "Employee.cpp"
>
>
> Dane Ensign
>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle
> 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id149&alloc_id=8166&op=C0ick
> _______________________________________________ Dev-cpp-users mailing
> list Dev...@li... TO UNSUBSCRIBE:
> http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|