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 6642141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:53:43+00:00 2026-05-25T23:53:43+00:00

everyone I try to add c++ class into my iphone project.but I got so

  • 0

everyone

I try to add c++ class into my iphone project.but I got so many error message

for example , in MyClass.h

struct DefaultData{
    char id[32];
    char name[256];
};


struct DefaultDataList{
    int size;
    //Here got a error1 : **Expected specifier-qualifier-list before "DefaultData"**
    DefaultData *dataList;
};

//Here got error 2:**Expected identifier or'(' before ':' token**
struct BookData:DefaultData{
    char class_id[32];
    char country_id[32];
    char author[128];
    char file_type[32];
    char file_size[32];
    :
    :
};

Does anyone know what’s going on here ???

beacuse the c++ is not create by me …

And I don’t write c++ before , so I’m very confused …

Does it have any tutorial is about How to import C++ class to object-c ???

Thanks for any reply or answers

Webber

  • 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-05-25T23:53:44+00:00Added an answer on May 25, 2026 at 11:53 pm

    Objective-C does not support C++ classes – you need Objective-C++ to mix C++ with Objective-C.

    As for your errors, the code you’ve posted is neither valid C nor C++.

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

Sidebar

Related Questions

When I try to build my setup project, I get the following error: An
Everyone (at least everyone who uses a compiled language) has faced compilation errors but
Everyone managing open-source-software runs into the problem, that with the time the process of
I have been looking around online to try to find a complete solution but
Sorry to bother everyone again. For some reason when I try to run the
Update : I edited the code, but the problem persists... Hi everyone, this is
Hey everyone, I have a iPhone App I am creating. It uses a uitableview
everyone, i've a little problem how to use variable from another class file to
Hey Everyone, Sorry to bother you with this, but I'm having an issue with
everyone , I'm try to embed youtube movie in app I find it need

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.