我想在应用程序中使用readfile 或者 writefile 函数发像驱动程序发一个数组 ,这个数组ULONG buf[256] 我想把一个 cstring filename 的字符串放到这个数组里 使用strcopy 函数不行,请问如何,为readfile 或者...
全文
回复(7) 2005-04-22 08:41 来自版块 - c/c++入门(VC,KeilC使用)
表情
petergao引用第6楼wyq521003于2007-09-13 12:17发表的 : char buf[256]; sprintf(&buf,"%c",filename); 这个应该可以实现 应该为 char buf[256]; sprintf(buf,&qu...(2008-01-14 21:20)
wyq521003char buf[256]; sprintf(&buf,"%c",filename); 这个应该可以实现(2007-09-13 12:17)
wanghui219用户被禁言,该主题自动屏蔽!(2007-09-13 10:46)
dhmdhmchar buf[256]; sprintf(&buf,"%c",filename);(2007-08-10 16:08)
nscboy你要是不怕麻烦,那就用for循环啊. 用CSring::GetAt(n) 把字符串中的字符一个一个取出来,你愿意怎么出来就怎么处理喽(2007-06-07 10:53)
maqianyjx2003,我问你,为什么要用ULONG,你发送的数据不是字符(char)类型吗?改成char buf[256]比较好。(2005-04-22 10:26)
maqianstrcpy( (char *)buf, LPCTSTR( filename ) ); strcopy是不行,因为没有这个函数。 [编辑 - 4/22/05 by maqian](2005-04-22 10:06)

返回顶部