a very simple problem about # include files but i am a beginer 
Author Message
 a very simple problem about # include files but i am a beginer

It's tough to say without seeing the errors, but some common things are:

- A file gets included in one file and then that file gets included
elsewhere and the net effect is that the file gets included twice (or more
times)
- The code requires some other include to come first so that a class or
function is defined before it is used.
- A class is defined in more than spot.

Typically include files have the extension .hpp or .h for C++.  You can name
then anything you want, but if you include .cpp file you are probably going
to confuse someone somewhere along the way.

HTH,

Tom


Quote:
> hi all:
>    i was very strange  when i include a file "mdiwinctrl.cpp" in
> "mainfrm.cpp", three error was displayed. but when i include this file in
> "mainfrm.h". there was no error.  but i see other can do that.what wrong
> with my code.i have any other modified to the wizard's code.



Tue, 28 Dec 2004 17:58:18 GMT  
 a very simple problem about # include files but i am a beginer
hi:
 i had checked all my code in your ways ,but the error was still in there!i
had post my code to you,very thank for your help!



Quote:
> It's tough to say without seeing the errors, but some common things are:

> - A file gets included in one file and then that file gets included
> elsewhere and the net effect is that the file gets included twice (or more
> times)
> - The code requires some other include to come first so that a class or
> function is defined before it is used.
> - A class is defined in more than spot.

> Typically include files have the extension .hpp or .h for C++.  You can
name
> then anything you want, but if you include .cpp file you are probably
going
> to confuse someone somewhere along the way.

> HTH,

> Tom



> > hi all:
> >    i was very strange  when i include a file "mdiwinctrl.cpp" in
> > "mainfrm.cpp", three error was displayed. but when i include this file
in
> > "mainfrm.h". there was no error.  but i see other can do that.what wrong
> > with my code.i have any other modified to the wizard's code.



Wed, 29 Dec 2004 04:32:07 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. I am a retard (perhaps a simple problem??)

2. Simple but very weird, project file in VC++ 6 included

3. Simple but very weird, project file in VC++ 6 included

4. SIMPLE [include file] question

5. Including problem.(should be simple)

6. I am having problems with MFC42.dll file

7. Makefile.am and -I /project/include

8. Beginer - extracting data from XML file

9. include file of includes

10. simple question, but I am stuck.

11. source for included included files

12. Why won't a include file get included some times and not other

 

 
Powered by phpBB® Forum Software