没法用控制台?
用AfxMessageBox()每次都要确定

解决方案 »

  1.   

    用这个行不?
    TRACE("%s",sMsg);
      

  2.   

    MFC: TRACE
    Non-MFC: OutputDebugString都是输出到Output窗口
      

  3.   

    TRACE(你想输出的中间变量,只能是字符串);
    在debug模式下输出到output窗口,release下无效
      

  4.   

    AfxDump<<i<<"\n";
    比Trace更简单,类似cout语法(不必进行类型规格化);
    同样输出到output(最下面的那个框框)
      

  5.   

    楼上的那个怎么用不了
    TRACE最多只能输出512字符,如果更多字符,用什么可以实现?
      

  6.   

    Your program code should not call AfxDump, but should instead call the Dump member function of the appropriate object.
      

  7.   

    OutputDebugString也许没有长度限制,其实如果消息过长了,可以考虑用文件了
      

  8.   

    OutputDebugString也有限制
    但还好,能显示的比较多了
    确实,如果长了就写文件
    呵呵