[求助]怎么赋值?一个简单的问题!
char *sy[10]={"0000","0000","0000","0000","0000","0000","0000","0000","0000","0000"};
能把sy[10]中的任何一值赋给一个整数变量吗?怎么赋给呢?
char *sy[10]={"0000","0000","0000","0000","0000","0000","0000","0000","0000","0000"};
能把sy[10]中的任何一值赋给一个整数变量吗?怎么赋给呢?
sy就是一个常二级指针.
相当于二维数据的数组名.
比如,将第二个字符串中的第0个字符赋给一个整数
d,可以这样做:d=sy[1][0];也可以d=*(*(sy+1)+0);
[此贴子已经被作者于2007-10-6 16:54:28编辑过]