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

  • Home
  • SEARCH
  • 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 8159391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:53:42+00:00 2026-06-06T17:53:42+00:00

I am working on an iphone app in objective-c and I am having trouble

  • 0

I am working on an iphone app in objective-c and I am having trouble with making an array out of a class variable, for example…

I have a class named Cube and I am tryin to make an instance of this class named map that is an array

Cube map[10][10];

Xcode then says it is an error and suggests I do this

Cube *map[10][10];

When I do it this way though ^ I cannot access one of my methods I defined in the class Cube, now this is not ALL my methods, it is just one single method that wont work anytime I try to call it. The only thing different about this method than the others is that I pass a parameter to it. The Cube class declaration and definition both compile flawlessly.

Can anyone explain to me how to make a class with a 2 dimensional without turning it into a pointer. Also why does xcode recommend I make it a pointer, and why doesn’t the method work when I do it this way?

  • 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-06T17:53:45+00:00Added an answer on June 6, 2026 at 5:53 pm

    You probably want to use a Cocoa style array, i.e. NSArray or NSMutableArray instead of C-style array. It is much more flexible and is designed to work with Objective-c objects. Have a look at this simple tutorial on using a Cocoa array: http://iphonelearning.wordpress.com/2011/08/24/nsarray-and-nsmutablearray/.

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

Sidebar

Related Questions

I am working with iPhone app(LandscapeRight Mode), I have added a Image view named
I'm working on an iPhone app using objective C. I've got class A, which
Working on an iPhone app where I have a class instance that is defined
I am working on an iPhone app with Apple Push Notification integration. I have
I'm working on an iphone app and want to have a page showing multiple
I'm working in a iPhone app that needs to send a array as a
I am working on an iPhone app, in which I have to enlist all
I'm currently working on an iPhone app and I have a library from a
Greetings! I have a working iPhone app (huzzah!) that uses a MainView.xib containing a
I'm working on an iPhone app in objective-c also using cocos2d for graphics. I

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.