M
Mogens Heller Jensen
Hello group!
I have a (basic, I guess) question about the order of my definitions...
I have the following (a structure to wrap the data of a thread):
/* Thread data */
typedef struct tTkThread {
/* <snip>...</snip> */
void *pRunFunc;
} TkThread;
/* Thread procedure */
typedef void (*TkThreadProcedure)(TkThread *pThis);
My question is: How do I change the type of pRunFunc from void* to
TkThreadProcedure?
If I do my definitions in the order shown above, the compiler will complain
about not knowing the TkThreadProcedure function pointer type.
If I switch the order of the function pointer typedef and the structure def,
the compiler will complain that it does not know the TkThread structure.
Thanks in advance!
-Mogens
I have a (basic, I guess) question about the order of my definitions...
I have the following (a structure to wrap the data of a thread):
/* Thread data */
typedef struct tTkThread {
/* <snip>...</snip> */
void *pRunFunc;
} TkThread;
/* Thread procedure */
typedef void (*TkThreadProcedure)(TkThread *pThis);
My question is: How do I change the type of pRunFunc from void* to
TkThreadProcedure?
If I do my definitions in the order shown above, the compiler will complain
about not knowing the TkThreadProcedure function pointer type.
If I switch the order of the function pointer typedef and the structure def,
the compiler will complain that it does not know the TkThread structure.
Thanks in advance!
-Mogens