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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:16:51+00:00 2026-06-13T17:16:51+00:00

I need to fill a dae_prim *array_prim; where dae_prim is a class I created.

  • 0

I need to fill a dae_prim *array_prim; where dae_prim is a class I created.

I want to use C style because I will pass all those data to OpenGL.

When I’m trying to make a : mesh->array_prim[i] = mysexyprim it fails with a “subscript requires size of interface”.

I think I understand the problem (Obj-C wants me to use a NSArray) but how can I bypass this?

More code

class meshes:
@public:
   dae_prim *prims;
   int primcount;

.

model->meshes->prims = malloc(sizeof(dae_prims*) * model->meshes->primcount);
dae_prim *prims = [[dae_prim alloc]init];
model->meshes->prims[1] = prims; //here is the problem
  • 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-13T17:16:52+00:00Added an answer on June 13, 2026 at 5:16 pm

    You need to use a double pointer for meshes->prims, as you want an array of pointers.

    class meshes:
    @public:
       dae_prim **prims; /* a C array of objects pointers */
       int primcount;
    
    model->meshes->prims = malloc(sizeof(dae_prims*) * model->meshes->primcount);
    model->meshes->prims[1] = [[dae_prim alloc]init];
    

    Cheers.

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

Sidebar

Related Questions

I need to fill a UITableView from an NSSet data source. Obviously I want
I need to fill a List with data from a DataColumn fetched in dataset.
I need to fill a table with large amount of data so I don't
I need to fill a bar chart with data. I have everything in place.
I need to fill my screen with grid which will be certain size. I
Hi I need to fill a datatable(in data set) row by row by providing
I have a wizard where users need to fill out data. You cannot navigate
I created a lib where I need to fill a byte array of 307200
i need to fill dropdownlist and use its selected value in inline code to
I need to fill some dropdown boxex from some reference data. i.e City List,

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.