- // EX_EXAM.cpp : 定义控制台应用程序的入口点。
- //
- #include "stdafx.h"
- #include <iostream>
- #include <stdarg.h>
- using namespace std;
- int **getC(int m,int n);
- int _tmain(int argc, _TCHAR* argv[])
- {
- int **t=getC(5,3);
- t[1][2]=10;
- cout<<t[1][2]<<endl;
- return 0;
- }
- int **getC(int m,int n)
- {
- int **a;
- int i;
- a = (int **)malloc(sizeof(int *)*m);
- for (i=0; i<5; i++)
- a[i] = (int *)malloc(sizeof(int)*n);
- return a;
- }