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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:16:44+00:00 2026-05-19T01:16:44+00:00

I feel a bit miffed at the moment, I done a few iPhone projects

  • 0

I feel a bit miffed at the moment, I done a few iPhone projects that use floats and ints etc and all is fine.

I now using OpenGL and GLFloat[] C arrays etc and it seems unless I make methods to set / get them it crashes on the device (not the simulator). Now as these are not setup as properties (I don’t think c arrays can) it kind of makes sense. However the project has been working for months without them. It seems something in the code is wiping out anything float / ints to the point that the debugger can see an assigned value but accessing it crashes the phone.

As soon as I think I know something for this platform, something changes my mind lol.

The question is.

How do you properly declare and use float arrays (float[3]) and ints (I usually do these as properties) so that you can set and get them.
Should you need to make your own methods to get and set them?

  • 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-19T01:16:45+00:00Added an answer on May 19, 2026 at 1:16 am

    Properties work the same way with primatives as Objects, except they get assigned instead of retained:

    @property (nonatomic, assign) int someInt;
    

    Sorry, got a little hasty there. C arrays are not supported with properties. You will have to roll your own getter/setter for C arrays. If you still want to have a property, you can use an NSArray of GLfloat primatives.

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

Sidebar

Related Questions

I have recently started exploring Maven, but I feel a bit overwhelmed of all
This is a bit of a Visual Studio question. I feel with all the
I still feel a bit unsafe about the topic and hope you folks can
I haven't implemented a search feature before and feel a bit stuck. I have
I feel like a bit of a dummy here. I downloaded CCValidator for CruiseControl.NET
I feel a little bit silly asking this, but I haven't been able to
Okay, I feel like a bit of a 800 pound gorilla trying to thread
Started learning Wicket after ASP.NET MVC and feel a little bit confused about managing
My one activity seems to have grown quite a bit and I feel like
I feel a bit silly asking this as the answer is bound to be

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.