Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8391527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:17:11+00:00 2026-06-09T19:17:11+00:00

struct reprVectorsTree; #ifdef __cplusplus extern C { #endif typedef reprVectorsTree * RHandle; RHandle create_reprVectorsTree(float

  • 0
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 : ')'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:17:13+00:00Added an answer on June 9, 2026 at 7:17 pm

    Try:

    typedef struct reprVectorsTree * RHandle;
    

    You can’t just use a struct as if it’s a type in C without a typedef (e.g. typedef struct reprVectorsTree;)

    EDIT: You’ll also need to #include <stdbool.h> for the bool type assuming you’re using a recent C compiler, or just use an int instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

struct pointsto_val_def { unsigned int lhs; bitmap rhs; struct pointsto_val_def *next; }; typedef struct
struct person { int age; char name[100]; struct person *next; }; void delfirst(struct person
struct X{}; template<class T> decltype(X() == int()) f(T const&){ return true; } int main(void)
struct X { X():mem(42){} void f(int param = mem) //ERROR { //do something }
struct A { int a; virtual void print() {} }; struct B : A
struct TimerEvent { event Event; timeval TimeOut; static void HandleTimer(int Fd, short Event, void
struct counter{ long long counter; } struct instruction{ struct counter *counter int repetitions; void
struct C { int Foo(int i) { return i; } typedef decltype(C::Foo) type; };
struct mystruct { int i; double f; } ; typedef mystruct myotherstruct; //the other
struct leaf { int data; leaf *l; leaf *r; }; struct leaf *p; void

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.