C ++宏扩展,调试 [英] C++ macro expansion, debugging

查看:50
本文介绍了C ++宏扩展,调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C ++代码中有一堆MACROS,它们可以扩展为某些功能.我正在调试一些东西.只是想看看代码最终看起来像什么?"

I have a bunch of MACROS in C++ code that expand into some functions. And I am debugging something. Just want to see what the code ends up looking like"

有什么想法吗?

推荐答案

您可以查看预处理器的输出,以查看经过预处理的代码.

You can view the preprocessor output to see what the code looks like after it is preprocessed.

gcc和Visual C ++都将预处理为stdout.

gcc and Visual C++ will both preprocess to stdout if you pass the -E flag on the command line to the compiler.

这篇关于C ++宏扩展,调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆