C++ undeclared identifier when trying to create an instance of a struct -


i have struct declared in c++ header file line:

struct aii_common_export message{     ... }; 

i trying create instance of struct in c++ source file, can set/ use of attributes stored in struct:

message data; 

however, when compile code, "undeclared identifier" error on line... have included header file in source file, don't understand why getting error- can explain me?

i tried creating instance of with:

aii_common_export message data; 

but got compile error: "syntax error: missing ';' before identifier 'data'.

any ideas how can fix this, can create instance of struct?

edit

i have found aii_common_export definition- defined with:

#    define aii_common_export ace_proper_import_flag 

and ace_proper_import_flag defined with:

#define ace_proper_import_flag __declspec (dllimport) 

these 2 definitions in separate header files.

just do.

 struct message{         ...     };  message data; 

see http://www.cplusplus.com/doc/tutorial/structures/


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -