|
头文件
#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;,但添加后,总是显示某些函数在某处已应用错误
}
}
|
|