Improper use of typedef 'TManagerProc'

struct TManagerData
{
public:
    // Card is inserted callback procedure
   TManagerProc CardInserted;
    // Card was activated callback procedure
   TManagerProc CardActive;
    // Card was removed from the reader  callback procedure
   TManagerProc CardRemoved;
    // Invalid card was inserted into the reader callback procedure
   TManagerProc CardInvalid;
    // There is no card in the reader and reader is waiting for the next operation
   TManagerProc ReaderWaiting;
    // Card operation error  callback procedure
   TManagerErrorProc Error;
} ;

//Data manager is used to pass the callback procedures pointers to EIDNative
typedef TManagerData, MANAGER_DATA;
//Data manager is used to pass the callback procedures pointers to EIDNative
typedef TManagerData *PManagerData;

Error E2108 C:\MiniGUI\SAMPLES\APPLIC~1\hairstyl\Hairprg2\eidstructures.hpp 126: Improper use of typedef 'TManagerProc'
Error E2139 C:\MiniGUI\SAMPLES\APPLIC~1\hairstyl\Hairprg2\eidstructures.hpp 126: Declaration missing ;

where is TManagerProc defined? It has to be defined before it can be used.

//Callback procedure for card events
typedef void ( __stdcall * TManagerProc)(void);
//Callback procedure for card error event
typedef void ( __stdcall * TManagerErrorProc)(unsigned ErrorCode);

//Data manager is used to pass the callback procedures pointers to EIDNative

line 21: remove the comma. Otherwise your code compiles ok with VC++ 2012. All I did was place the two typedefs in your last post before the structured declaration in your first post, then removed the comma on line 21.

typedef void ( __stdcall * TManagerProc)(void);
typedef void ( __stdcall * TManagerErrorProc)(unsigned ErrorCode);

struct TManagerData
{
public:
    // Card is inserted callback procedure
   TManagerProc CardInserted;
    // Card was activated callback procedure
   TManagerProc CardActive;
    // Card was removed from the reader  callback procedure
   TManagerProc CardRemoved;
    // Invalid card was inserted into the reader callback procedure
   TManagerProc CardInvalid;
    // There is no card in the reader and reader is waiting for the next operation
   TManagerProc ReaderWaiting;
    // Card operation error  callback procedure
   TManagerErrorProc Error;
} ;

typedef TManagerData  MANAGER_DATA;
typedef TManagerData *PManagerData;

int main()
{

}

//Callback procedure for card events
typedef void ( __stdcall * TManagerProc)(void);
//Callback procedure for card error event
typedef void ( __stdcall * TManagerErrorProc)(unsigned ErrorCode);

//Data manager is used to pass the callback procedures pointers to EIDNative

Thanks it was usefull

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.