w*******n 发帖数: 773 | 1 A 2 dimensional array 5 by 10?
write a c++ function to return a pointer that can be accessed by both
a[i][j] and a[5*i+j]
there is problem in career cup similar, but not same. | J********a 发帖数: 5208 | 2 what's the input? basically
for (i=0;i
a[5*i] = (void *)& a[5*i+1];
【在 w*******n 的大作中提到】 : A 2 dimensional array 5 by 10? : write a c++ function to return a pointer that can be accessed by both : a[i][j] and a[5*i+j] : there is problem in career cup similar, but not same.
| j**w 发帖数: 382 | 3 int *foo()
{
return new int[5*10];
} | j********x 发帖数: 2330 | |
|