error C2011: 'CDataGrid' : 'class' type redefinition
-
Using the MS DataGrid in two different dialogs but in the same parent dialog I get the following error :\library\librarian\datagrid.h(13) : error C2011: 'CDataGrid' : 'class' type redefinition What should i do to solve this problem ? Check the following : In the main parent dialog with the name Properties.h i include the #include "BookNewDonator.h" #include "BookNewSupplier.h" which each of them has a DataGrid member in their classes and of course they include the "datagrid.h" What sould i do ? sdancer75
-
Using the MS DataGrid in two different dialogs but in the same parent dialog I get the following error :\library\librarian\datagrid.h(13) : error C2011: 'CDataGrid' : 'class' type redefinition What should i do to solve this problem ? Check the following : In the main parent dialog with the name Properties.h i include the #include "BookNewDonator.h" #include "BookNewSupplier.h" which each of them has a DataGrid member in their classes and of course they include the "datagrid.h" What sould i do ? sdancer75
Add
#pragma once
to the top of datagrid.h
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
-
Using the MS DataGrid in two different dialogs but in the same parent dialog I get the following error :\library\librarian\datagrid.h(13) : error C2011: 'CDataGrid' : 'class' type redefinition What should i do to solve this problem ? Check the following : In the main parent dialog with the name Properties.h i include the #include "BookNewDonator.h" #include "BookNewSupplier.h" which each of them has a DataGrid member in their classes and of course they include the "datagrid.h" What sould i do ? sdancer75
Use preprossor if condition to check datagrid.h file included already or not. mean you have to write the datagrid.h codes inside the #define directive. Example.. #if !defined(DATAGRID_H__INCLUDED_) #define DATAGRID_H__INCLUDED_ ...... #endif // DATAGRID_H__INCLUDED_ regards Vallikumar A
-
Using the MS DataGrid in two different dialogs but in the same parent dialog I get the following error :\library\librarian\datagrid.h(13) : error C2011: 'CDataGrid' : 'class' type redefinition What should i do to solve this problem ? Check the following : In the main parent dialog with the name Properties.h i include the #include "BookNewDonator.h" #include "BookNewSupplier.h" which each of them has a DataGrid member in their classes and of course they include the "datagrid.h" What sould i do ? sdancer75