相关代码 |
|
/* 程序9.08:二维指针数组.cpp */ #include //包含头文件 using namespace std; //使用名字空间std char *sTab[4][5] = {{" 姓名 ","数学","语文","英语","综合"}, {" 张丽 "," "," "," "," "}, {" 李丽 "," "," "," "," "}, {" 王丽 "," "," "," "," "}}; void Accept() { for(int i=1; i { cout for(int j=1; j { cout sTab[i][j]=new char; cin>>sTab[i][j]; } } } void Display() { for(int i=0; i { cout for(int j=0; j { cout } } cout } int main() { Accept(); Display(); return 0; }
相关资源 |
|