tags:

views:

282

answers:

1

Need help compiling in C. When using GCC at home (Windows, 3.4.5), the code compiles fine (even with -Wall). When using the uni's GCC (4.3.3, debian), I keep getting the following message - "expected ')' before '*' token". What might be the matter? (Needless to say, compiling it on school's farm is a must).

The exact error message: MatrixMultiplactionMacro.h:5: error: expected ')' before '*' token

    #ifndef _MATRIXMULTIPLACTIONMACRO_H
#define _MATRIXMULTIPLACTIONMACRO_H

void pseudoMain(
      member* (*__allocateMember)(), 
      void (*__freeMember)(member*), 
      char* (*__memberToString)(member*), 
      void (*__setToZero)(member*), 
      void (*__multiplyMembers)(member*, member*, member*), 
      void (*__addMembers)(member*, member*, member*), 
      void (*__writeToMember)(char*, member*),
      void (*__duplicateMember)(member*, member*)
      );

#endif

The problematic line, therefore: member* (*__allocateMember)(),

What am I doing wrong?

+6  A: 

The first argument to pseudoMain is a pointer to a function returning 'member', which isn't a C or C++ keyword, and I don't see a definition for it. Perhaps you are missing a #include?

Warren Young
[looks for C++ tag...] Still, probably the right answer.
Chris Lutz
Thank you, Warren. It was a missing link, after all. I feel foolish.
Albrecht