#include#define M 5#define N 13int main(void){ char *s1="abc",*s2="wxyz",*s3="ijklmn"; char str1[M][N]={"c","c "visual BASIC,"Java","Ada
#include#define M 5#define N 13int main(void){ char *s1="abc",*s2="wxyz",*s3="ijklmn"; char str1[M][N]={"c","c "visual BASIC,"Java","Ada"}; char *str2[M]={s2,str1[2],s1,"ijklm"}; char **str3=&s2; int i; printf("
"); printf("&s1=%ld,&s2=%ld,&s3=%ld
",&s1,&s2,&s3); printf("
"); for(i=0;i<5;i ) printf("&str1[%d]=%ld:strl[%d]=%s
",i,&str1[i],i,strl[i]); printf("
");}错误字符串储存形式未解.cppE:C题好题未解题字符串储存形式未解.cpp(7) : error C2061: syntax error : identifier 'visual'E:C题好题未解题字符串储存形式未解.cpp(7) : warning C4508: 'main' : function should return a value; 'void' return type assumedE:C题好题未解题字符串储存形式未解.cpp(8) : error C2065: 's2' : undeclared identifierE:C题好题未解题字符串储存形式未解.cpp(8) : error C2440: 'initializing' : cannot convert from 'int' to 'char *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style castE:C题好题未解题字符串储存形式未解.cpp(8) : error C2065: 'str1' : undeclared identifierE:C题好题未解题字符串储存形式未解.cpp(8) : error C2109: subscript requires array or pointer typeE:C题好题未解题字符串储存形式未解.cpp(8) : error C2440: 'initializing' : cannot convert from 'int' to 'char *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style castE:C题好题未解题字符串储存形式未解.cpp(8) : error C2065: 's1' : undeclared identifierE:C题好题未解题字符串储存形式未解.cpp(8) : error C2440: 'initializing' : cannot convert from 'int' to 'char *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style castE:C题好题未解题字符串储存形式未解.cpp(9) : error C2440: 'initializing' : cannot convert from 'int *' to 'char ** ' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style castE:C题好题未解题字符串储存形式未解.cpp(11) : error C2501: 'printf' : missing storage-class or type sp 写不下了 请更正后告诉我
展开
全部