Skip to main content
gamedev.net
🔒 Locked

pointers and arrays

Started by brewski 0 replies 450+ views
Original Post
brewski
brewski
I got two arrays made up like this: int array1[10][10]; int* array2[10]; for(int i=0;i<10;i++)array2=new int[10]; I use the same adressing syntax for both.. ie array[nr][nr]=... Now, am I correct in this statement: .array1 use one pointer to adress .array2 use two pointers (pointer to pointer)
Brewski
SysOp_1101
SysOp_1101
(Edited: I see the error in your code is actually a case of the HTML format gremlins.) =')

Yes, you are correct about the pointers in both cases.

SysOp_1101

[edited by - SysOp_1101 on May 29, 2002 3:11:51 AM]
SysOp_1101

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.