Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
An array is just a pointer
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Paul, post: 4195420"] Says who? Err no A pointer of type int(*)[10] doesn't point to an array of type int[10], it points to an array of type int[i][10]; You do not seem to understand that pointers to arrays point to an array of n-1 dimensional array. And pointers(of any type) do not return an array of data when they are dereferenced. 8.3.4 "If the * operator, either explicitly or implicitly as a result of subscripting, is applied to this pointer, the result is the pointedto (n - 1 )dimensional array, which itself is immediately converted into a pointer." Please get your facts right before preaching about proper use of the language terminology. [i] No its a pointerto an array. Nobody is saying the array is a pointer. I think you should hang your head in shame for a while, after this post, and listen to someone who knows better instead of trying preach about things you are not clear on. After making the statements above ref: " Only pointers of an array type point to an array of said type. Only pointers of an array type return an array of data when dereferenced" You obviously are being misguided by the likes of Leigh Johnston and other people who are twisting words around and declaring falsities.[/i][/i] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
An array is just a pointer
Top