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
私はここの答えに従ってインターフェースヘッダーファイルを書きました cでc++オブジェクトを使用する方法は? 、しかし構文エラーが発生しますか?何が欠けている?
----編集----私はそれをに変更しました
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
現在、float*行で次のエラーが発生します
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 : ')'