不知道怎么把制表符写入txt文件,写的'\t'结果成了问号“?” 请教了,在线等 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 但是txt文本里面的内容是用来做记录查看用的;原来用DAO做的,后来用了ADO之后就不能用DAO的库了,所以就想把结果存到TXT里面, fprintf(out, "\t");应当是没有问题的,我都是这样用的... 不知道用.xls格式的文件进行保存可以么? FILE *pFile=fopen("2.txt","a"); char ch[100]; int i=0; int tempLength=0, tempLength1=0, tempLength2=0, tempLength3=0; if(m_chk_1.GetCheck() == 1) { tempLength1= m_strTest.GetLength(); // ch= (LPCTSTR)m_strTest; for(i=tempLength; i<(tempLength1+tempLength); i++) ch[i]=m_strTest.GetAt(i); ch[i+1]= '\t'; tempLength+=tempLength1+1; } if(m_chk_2.GetCheck() == 1) { tempLength2= m_strTest2.GetLength(); // ch= (LPCTSTR)m_strTest; for(i=tempLength; i<(tempLength2+tempLength); i++) ch[i]=m_strTest2.GetAt(i); ch[i+1]= '\t'; tempLength+=tempLength2+1; } if(m_chk_3.GetCheck() == 1) { tempLength3= m_strTest3.GetLength(); // ch= (LPCTSTR)m_strTest; for(i=tempLength; i<(tempLength3+tempLength); i++) ch[i]=m_strTest3.GetAt(i); ch[i+1]= '\t'; tempLength+=tempLength3+1; } ch[tempLength+1]='\n'; fwrite(ch,1,tempLength+1,pFile); fclose(pFile);有一个记录,包含三个字符串,我现在要把这个记录保存到电脑上面,本来用DAO把记录保存为MDB文件是可以的,但是程序中加了ADO访问远程ORACLE数据库以后就不能再#include<afxdao.h>了,每办法就想把记录保存到TXT文件里算了,结果保存的制表符全部都成了“?”号,不知道怎么处理了 VS2008开发一个MFC智能Activex控件,在WM5上调试 MFC对话框之间数值的更新 在Static控件中重绘图形问题! 为什么我编译好的exe在cmd下无法运行 soket初学者的疑问,高手请赐教! 请推荐比较理想的免费空间 我的笔记本上没有串口,可否插个usb转rs232的外设来在笔记本上开发调试串口程序? tcp协议 send返回值正确 接收端数据错误 求教文件读写问题! 如何在组件内部主线程上同步触发事件? dll共享调用和控件焦点的问题 没分了……纯粹讨论一下——究竟MFC难在何处?
char ch[100];
int i=0;
int tempLength=0, tempLength1=0, tempLength2=0, tempLength3=0; if(m_chk_1.GetCheck() == 1)
{
tempLength1= m_strTest.GetLength();
// ch= (LPCTSTR)m_strTest;
for(i=tempLength; i<(tempLength1+tempLength); i++)
ch[i]=m_strTest.GetAt(i);
ch[i+1]= '\t';
tempLength+=tempLength1+1;
}
if(m_chk_2.GetCheck() == 1)
{
tempLength2= m_strTest2.GetLength();
// ch= (LPCTSTR)m_strTest;
for(i=tempLength; i<(tempLength2+tempLength); i++)
ch[i]=m_strTest2.GetAt(i);
ch[i+1]= '\t';
tempLength+=tempLength2+1;
}
if(m_chk_3.GetCheck() == 1)
{
tempLength3= m_strTest3.GetLength();
// ch= (LPCTSTR)m_strTest;
for(i=tempLength; i<(tempLength3+tempLength); i++)
ch[i]=m_strTest3.GetAt(i);
ch[i+1]= '\t';
tempLength+=tempLength3+1;
} ch[tempLength+1]='\n'; fwrite(ch,1,tempLength+1,pFile);
fclose(pFile);有一个记录,包含三个字符串,我现在要把这个记录保存到电脑上面,本来用DAO把记录保存为MDB文件是可以的,但是程序中加了ADO访问远程ORACLE数据库以后就不能再#include<afxdao.h>了,每办法就想把记录保存到TXT文件里算了,结果保存的制表符全部都成了“?”号,不知道怎么处理了