QQ登录

只需一步,快速开始

快捷登录

登录 或者 注册 请先

UG爱好者

查看: 876|回复: 0
打印 上一主题 下一主题

[求助] 将别人C++6.0复制来的源代码,用VS2012打开,为什么总是显示cerr未标识?

[复制链接]

二级士官

Rank: 2

13

主题

23

帖子

390

积分
跳转到指定楼层
楼主
发表于 2019-1-25 15:08:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
头文件
#include <uf.h>
#include <uf_exit.h>
#include <uf_ui.h>
#include <uf_mb.h>
#include <uf_part.h>
#include <windows.h>
#include <stdlib.h>

#if ! defined ( __hp9000s800 ) && ! defined ( __sgi ) && ! defined ( __sun )
#        include <strstream>
        using std::ostrstream;
        using std::endl;       
        using std::ends;
#else
#        include <strstream.h>
#endif

#include <iostream>
#include "APP.h"   


//错误函数处
static void PrintErrorMessage( int errorCode )
{
    if ( 0 != errorCode )
   {
               
        /* Retrieve the associated error message */    //检索相关的错误消息
        char message[133];
        UF_get_fail_message( errorCode, message );

        /* Print out the message */
       UF_UI_set_status( message );

        // Construct a buffer to hold the text.     //构造一个缓冲区来保存文本。
       ostrstream error_message;

        // Initialize the buffer with the required text.
       error_message <<  endl
                      << "Error:" <<  endl
                      << message
                      <<  endl <<  endl <<  ends;

            // Write the message to standard error     
       cerr << error_message.str(); //此处总是显示cerr未标识,尝试了开头添加using namespace std;,但添加后,总是显示某些函数在某处已应用错误
    }
}




有奖推广贴子: 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

 
 
QQ:1359218528
工作时间:
9:00-17:00
 
微信公众号
手机APP
机械社区
微信小程序

手机版|UG爱好者论坛 ( 京ICP备10217105号-2 )    论坛管理员QQ:1359218528

本站信息均由会员发表,不代表本网站立场,如侵犯了您的权利请联系管理员,邮箱:1359218528@qq.com  

Powered by UG爱好者 X3.2  © 2001-2014 Comsenz Inc. GMT+8, 2024-9-20 18:38

返回顶部