请教了,在线等

解决方案 »

  1.   

    但是txt文本里面的内容是用来做记录查看用的;原来用DAO做的,后来用了ADO之后就不能用DAO的库了,所以就想把结果存到TXT里面,
      

  2.   

    fprintf(out, "\t");应当是没有问题的,我都是这样用的...
      

  3.   

    不知道用.xls格式的文件进行保存可以么?
      

  4.   

    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文件里算了,结果保存的制表符全部都成了“?”号,不知道怎么处理了