学习C++的一些范例

源代码在线查看: 程序9.08:二维指针数组.cpp

软件大小: 52 K
上传用户: liu4052032
关键词: 范例
下载地址: 免注册下载 普通下载 VIP

相关代码

				/* 程序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;
				}
				
				
				
				
							

相关资源