![](http://i0.hdslb.com/bfs/article/3d6fc07b01cf4a662397a780c3165f917608c1a8.png)
![](http://i0.hdslb.com/bfs/article/dc1a22d361f7e1202569b176a5d43acdf22ac935.png)
![](http://i0.hdslb.com/bfs/article/96835365e80226b2f8b11d68d0d3eef3af6bc34a.png)
主函数:
#include<iostream>
#include"12.17erweishuzu.h"
using namespace std;
int main()
{
double (*qwe)[10];
qwe= erwei(2.2, 1);
for (int i = 0; i < 10; i++)
for (int j = 0; j < 10; j++)
cout << qwe[i][j] << endl;
cout << endl;
cout << qwe << endl;
cout << erwei << endl;
return 0;
}
源文件,函数定义代码:
#include<iostream>
#include"12.17erweishuzu.h"
using namespace std;
double(*erwei(double t, int x))[10]
{
double(*high)[10] = new double[10][10];
for (int ii = 0; ii < 10; ii++)
{
for (int jj = 0; jj < 10; jj++)
{
high[ii][jj] = ii * 10 + jj;
}
}
return high;
}
头文件,函数声明:
#pragma once
#include<iostream>
using namespace std;
//函数的声明
double(*erwei(double t, int x))[10];