struct reprVectorsTree;
#ifdef __cplusplus
extern "C" {
#endif
typedef reprVectorsTree * RHandle;
RHandle create_reprVectorsTree(float **, int , int );
void free_reprVectorsTree(RHandle);
float* work_decode(RHandle , bool*, int);
#ifdef __cplusplus
}
#endif
I wrote the interface header file according to the answer here How to use c++ objects in c? , but I get the syntax error? what is missing?
----edit---- I changed it to
struct reprVectorsTree;
#ifdef __cplusplus
extern "C" {
#endif
typedef struct reprVectorsTree * RHandle;
RHandle create_reprVectorsTree(float **, int , int );
void free_reprVectorsTree(RHandle);
float* work_decode(RHandle , bool *, int);
#ifdef __cplusplus
}
#endif
now I get the following error on the float* line
error C2143: syntax error : missing ')' before '*'
error C2081: 'bool' : name in formal parameter list illegal
error C2143: syntax error : missing '{' before '*'
error C2059: syntax error : ','
error C2059: syntax error : ')'