ChinaUnix.net
相关文章推荐:

如何给字符数组赋值

如何将 string data = "68656C6C6F2C776F726C6405050505";复制DES3_init[]; 谢谢

by mingjie_5200 - C/C++ - 2008-09-05 11:06:38 阅读(15510) 回复(9)

相关讨论

如题,现在定义了一个数组:unsigned char arr[1]; 请问如何赋值?? 谢谢

by lqq_1229 - C/C++ - 2007-10-08 11:47:25 阅读(19256) 回复(10)

请问如何让shell的数组数组赋值,从而得到两个相同内容的数组

by hinux - Shell - 2007-09-30 13:50:44 阅读(9633) 回复(3)

我定义了一个二维字串数组 char str[3][5]。请教下,二维字串如何进行字串的修改呢?比如修改第二个字串的值,我用 str[1] = "tom" 也不行,用 str[1][] = "tom" 也不行,在g++ 3.2.2下却无法编译通过。如果用 str[1][0] = 't' 这样的形式那太麻烦了吧,有没有其它的好的方法呢?多谢!!

by jiazhengw - C/C++ - 2006-04-25 10:46:12 阅读(7455) 回复(2)

inputFile>>t; t是一个对象数组,我想用ifstream对象inputFile对t的每个对象赋值,却出现了error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'class teamInf []' (or there is no acceptable conversion)这是为什么啊,应该如何t赋值啊,假设文件中的数据是 **** ********* *********** **** ********* *********** **** ********* *********** **** ********* *********** **** *****...

by cylin - C/C++ - 2006-05-31 13:50:28 阅读(2413) 回复(6)

代码: #include "iostream.h" #include "stdio.h" #include "string.h" #include "ctype.h" struct ylj {char *ys[8]; struct ylj *next; }; void main() {struct ylj *p1; p1=new ylj; char ch='a'; (*(p1->;ys[1])+1)=ch; cout<<"中文"<

by hbszrbw - C/C++ - 2003-11-27 22:54:54 阅读(1527) 回复(0)

看了"网中人"的shell十三问,其中有一个关于单引号和双引号的例子: -------------------------------------------------- $A=b\ >c > $echo $A b c $ --------------------------------------------------- 但今天我试了一下返回的是bc,而不是b(CR)c 我还试了$A='b\ >c > $ 以及 $A="b\ >c > 都不行,请问为什么?

by ailms - Shell - 2004-06-30 00:07:17 阅读(1852) 回复(6)

find出来的结果想赋值数组使用 find . -type f -printf "%u %g %p\n" 查找出来的结果如下 user1 group1 file1 user2 group2 file2

by ayalastrike - Shell - 2009-05-14 10:52:41 阅读(3144) 回复(1)

如何将结构体的内容 传数组? #define INT8U unsigned char typedef struct{ INT8U idname; INT8U idlen; INT8U idvalue[4]; INT8U timename; INT8U timelen; INT8U timevalue[7]; }PACKED S_STRU, *PS_STRU; S_STRU sstru; INT8U sendbuf[1024]; 我这样做行不行? memcpy(sendbuf, &sstru, sizeof(sstru));

by herocsz - C/C++ - 2009-04-22 21:20:05 阅读(12353) 回复(10)

比如我有一个文件 root@log:/# more list 4561 diff.sh 6324 list.sh 我想把第一列赋值一个数组,第二列赋值另外一个数组如何做?我写一个循环去赋值貌似没用,不知道哪里写错了。 请哪位写个简单的例子看看,非常感谢。

by 无奈黑眼圈 - Shell - 2011-05-09 18:18:23 阅读(7378) 回复(6)

内容如下: /dev/hda2 / none /proc usbdevfs /proc/bus/usb /dev/hda1 /boot none /dev/pts none /dev/shm none /proc/sys/fs/binfmt_misc 行数不定,列数就2列。可以用c或shell。 我是刚开始学编程,还请各位大哥不吝赐教,稍微说的详细的。

by linux-yxzjf - C/C++ - 2004-03-02 14:43:33 阅读(3364) 回复(4)