#include <string>
#include <iostream>
#include <vector>
using namespace std;
void print(double **tab,int rows,int cols)
{
for(int i=0;i<rows;i++){
for(int j=0;j<cols;j++){
cout<<*((double *)tab+i*cols+j)<<" ";
}
cout<<endl;
}
}
int main()
{
double ta[2][3]={{1.0,2.0,3.0},{4.0,5.0,6.0}};
print((double **)ta,2,3);
return 0;
}
网友评论