首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

MFC输出日志使用解决办法

2014-05-26 
MFC输出日志使用c:\documents and settings\yin\桌面\excel\xlrw\xlrw\xlrwdlg.cpp(241) : warning C4244

MFC输出日志使用
>c:\documents and settings\yin\桌面\excel\xlrw\xlrw\xlrwdlg.cpp(241) : warning C4244: “=”: 从“ULONGLONG”转换到“DWORD”,可能丢失数据
1>c:\documents and settings\yin\桌面\excel\xlrw\xlrw\xlrwdlg.cpp(270) : warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        e:\vs 2008\vs安装\vc\include\string.h(157) : 参见“strncpy”的声明
1>正在生成代码...
1>正在编译资源...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>正在执行预链接事件...
1>===本程序下载于VC知识库(www.vckbase.com)===
1>-------技术支持由UIPower提供(www.uipower.com)------
1>......如遇到任何技术问题请发邮件vckbase@vckbase.com......
1>正在编译资源清单...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>正在链接...
1>正在嵌入清单...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>生成日志保存在“file://c:\Documents and Settings\yin\桌面\excel\xlrw\xlRW\Debug\BuildLog.htm”
1>xlRW - 0 个错误,6 个警告
========== 全部重新生成: 成功 1 个,失败 0 个,跳过 0 个 ==========
我想问问怎么设置这个,工程里面找了半天也不知道在哪里啊 !!
[解决办法]
#pragma message("xxx")
[解决办法]

引用:
#pragma message("xxx")

message
#pragma message( messagestring )

Sends a string literal to the standard output without terminating the compilation. A typical use of the message pragma is to display informational messages at compile time.

The following code fragment uses the message pragma to display a message during compilation:

#if _M_IX86 == 500
#pragma message( "Pentium processor build" )
#endif

The messagestring parameter can be a macro that expands to a string literal, and you can concatenate such macros with string literals in any combination. For example, the following statements display the name of the file being compiled and the date and time when the file was last modified:

#pragma message( "Compiling " __FILE__ ) 
#pragma message( "Last modified on " __TIMESTAMP__ ) 

热点排行