char a[3][25]= {"XUANXIU YUWEN ", "XUANXIU YUWEN", "FEIXUANXIU TIYU"};就行了 定义成二维数组存储时可以简单看作一排一个字符串数组,char* a[10] = {"XUANXIU", "YUWEN", "XUANXIU", "SHUXUE", "FEIXUANXIU", "TIYU"};这样是定义了一个指针数组 指针元素分别指向每一个对应的字符串存储的首地址
字符串数组怎么定义
char a[3][25]= {\"XUANXIUYUWEN\", \"XUANXIUYUWEN\", \"FEIXUANXIUTIYU\"};就行了定义成二维数组存储时可以简单看作一排一个字符串数组,char* a[10] = {\"XUANXIU\", \"YUWEN\", \"XUANXIU\", \"SHUXUE\", \"F
本文来自网络,不代表本站立场。转载请注明出处: https://www.djladysyren.com/a-339585.html