English 中文(简体)
是否有可行的办法印刷C加工商的电文?
原标题:Is there a portable way to print a message from the C preprocessor?

我谨这样做。

#print "C Preprocessor got here!"

(a) 用于拆船目的。 这样做的最佳/最可行的方法是什么?

最佳回答

#warning "C Preprocessor got here!"

AFAIK, 大部分编辑,但MSVC除外。

#pragma message ( "C Preprocessor got here!" )
问题回答

您不妨尝试:#pragma information ("Hello World>/code>

多数汇编者将承认<条码>预警指令。

 #warning "Got here"

还有标准编号指示,

 #error "Got here"

虽然所有汇编者都支持这一点,但它也停止了汇编/处理工作。

#pragma message("foo")

工作出色。 即便是你使用,也不允许编辑。

另一种解决办法是使用评论和手稿处理。 这涉及一些纪律(或带有打字体的手稿)。

例如,我添加以下评论格式:/TODO,然后是一份把所有这些内容汇集到一份报告中的手稿。

对于更复杂的使用案件,你可以尝试写上你自己的简单处理程序。 例如,你可以把你的资料来源编辑成*.c2文档。 简单的处理器将读到源头,看//TODO,并将f(“TODO......”)输入*>。





相关问题
How to render a printable image from a SWF

I m working on a project at the moment where the client uses an off-the-shelf Flash library to display data against a map. It s a SWF that we feed some XML data and it renders it in various ways, such ...

Html printed page resolution (or size in pixels)

Does anybody know what is the resolution that will be used to render a printed HTML page. I d like to know what size (in centimeters or inches) will be a printed image of say 500x500pixels. I know ...

How can I select a different printer in a web application?

I have a Web application programmed in C#. There are several printers and I want to choose any of them and execute the action, I would like some kind of Form to load all printers. I found this for ...

Visual Studio 2010 Beta 2: Can I print in color?

I have to turn in a hard copy of some code with an assignment. Is there any way in Visual Studio 2010 to print C# source code with syntax highlighting? PS: The assignment is solving a math problem, ...