T
Tio
I have project in MFC(vc++) . There are files and classes:
classes:dialog1,dialog2,aaa,bbb
----------------------
main.cpp
---------------------
#include "mainfrm.h"
#include "dialog1.h"
#include "dialog2.h"
dialog1 dlg1;
dialog2 dlg2;
_______________________
-----------------------
dialog1.cpp
----------------------
#include "aaa.h"
#include "dialog1.h"
-----------------------
dialog2.cpp
----------------------
#include "bbb.h"
#include "dialog2.h"
-----------------------
aaa.cpp
----------------------
#include "aaa.h"
#include "dialog1.h"
-----------------------
bbb.cpp
----------------------
#include "bbb.h"
#include "dialog2.h"
_____________________
in 'aaa.h' occurs:
dialog1 dlg;
in 'dialog1.h' occurs
aaa work;
and
in 'bbb.h' occurs:
dialog2 dlg;
in 'dialog2.h' occurs:
bbb work;
And how could be sequence of include files that there aren't any
errors. Now I always get:
error C2501: 'bbb' : missing storage-class or type specifiers
error C2501: 'aaa' : missing storage-class or type specifiers
during compling file :main.cpp
I try many combinations and always I got some errors like that.
How should I write this ?
classes:dialog1,dialog2,aaa,bbb
----------------------
main.cpp
---------------------
#include "mainfrm.h"
#include "dialog1.h"
#include "dialog2.h"
dialog1 dlg1;
dialog2 dlg2;
_______________________
-----------------------
dialog1.cpp
----------------------
#include "aaa.h"
#include "dialog1.h"
-----------------------
dialog2.cpp
----------------------
#include "bbb.h"
#include "dialog2.h"
-----------------------
aaa.cpp
----------------------
#include "aaa.h"
#include "dialog1.h"
-----------------------
bbb.cpp
----------------------
#include "bbb.h"
#include "dialog2.h"
_____________________
in 'aaa.h' occurs:
dialog1 dlg;
in 'dialog1.h' occurs
aaa work;
and
in 'bbb.h' occurs:
dialog2 dlg;
in 'dialog2.h' occurs:
bbb work;
And how could be sequence of include files that there aren't any
errors. Now I always get:
error C2501: 'bbb' : missing storage-class or type specifiers
error C2501: 'aaa' : missing storage-class or type specifiers
during compling file :main.cpp
I try many combinations and always I got some errors like that.
How should I write this ?