Archived

This topic is now archived and is closed to further replies.

Allocating memory for this array - int (* a)[10]

This topic is 4944 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was recently asked in a test what this: int (* a)[10]; was. I have since put in into visual studio, but I cannot work out how to allocate memory for it. How do I do this?

Share this post


Link to post
Share on other sites
It''s a pointer to an array of integers. Remove the parentheses and it''s an array of pointers to integers.

Don''t ask homework questions on here.

Share this post


Link to post
Share on other sites
Thanks guys.

quote:
Original post by Etnu
It's a pointer to an array of integers. Remove the parentheses and it's an array of pointers to integers.

Don't ask homework questions on here.


It's not a homework question - it was part of a test I had to do the other week, but I had no idea what it was.

[edited by - The Bag on May 31, 2004 1:05:29 PM]

Share this post


Link to post
Share on other sites