当前位置: 技术问答>linux和unix
将二进制数据写到文件中,查看出现乱码
来源: 互联网 发布时间:2017-02-11
本文导语: int main(int argc, char *argv) { int fd; int i=0; int txf[]={0x11,0x22,0x33,0x44,0x55}; system("touch /mnt/xie.txt"); fd=open("/mnt/xie.txt", O_RDWR); if(fd
int main(int argc, char *argv)
{
int fd;
int i=0;
int txf[]={0x11,0x22,0x33,0x44,0x55};
system("touch /mnt/xie.txt");
fd=open("/mnt/xie.txt", O_RDWR);
if(fd
{
int fd;
int i=0;
int txf[]={0x11,0x22,0x33,0x44,0x55};
system("touch /mnt/xie.txt");
fd=open("/mnt/xie.txt", O_RDWR);
if(fd