cpp 10.7

#include <stdio.h>
void copy_ptr(double target[][4],double source[][4],int n)
{
double (*p1)[4]=target,(*p2)[4]=source;
for(int i=0;i<12;i++)
{
**p1=**p2;
(**p1)++;
(**p2)++;
}
}
int main()
{
double source[3][4]={1,2,3,4,5,6,7,8,9,10,11,12};
double target[3][4];
copy_ptr(target,source,4);
for(i)
}

猜你喜欢

转载自www.cnblogs.com/younger-man/p/11636795.html
cpp