Visual Studio:当其他更改时,是否自动更新C ++ cpp / header文件? [英] Visual studio: automatically update C++ cpp/header file when the other is changed?

查看:112
本文介绍了Visual Studio:当其他更改时,是否自动更新C ++ cpp / header文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,如果我在标头或cpp中的函数中更改了签名,我希望它在另一个中自动更改。如果我在任何一个中添加了新功能,它都应同时出现在两者中。如果删除一个函数,它可能会注释掉另一个函数。
手动重复所做的更改似乎很愚蠢。

For example, if I change the signature in a function in either the header or the cpp, I'd like it to automatically change in the other one. If I add a new function in either, it should appear in both. If I delete a function, it could probably comment out the other one. Manually having to duplicate one's changes seems silly.

有人提到 http://www.lazycplusplus.com/ 来回答类似的问题,但这似乎是一个命令行工具,需要先保存然后在特定文件上运行此外部工具。这比我原本认为必要的手动步骤多;我想在输入时应用更改

Some people have mentioned http://www.lazycplusplus.com/ in response to a similar question, but it seems that that's a command line tool which would require saving and then running this external tool on a particular file. That's still more manual steps than I would have thought were necessary; I'd like this to apply changes as I type.

推荐答案

您要查找的内容是在Visual C ++中进行重构的,不幸的是只能通过第三方插件才能使用,据我所知,它不是以键入时方式提供的。

What you're looking for is refactoring in Visual C++ which is unfortunately only available via third-party plugins and to my knowledge not in an "as you type" fashion.

我使用的是出色的 Visual Assist X ,它可以重命名方法,更改签名等。

I'm using the excellent Visual Assist X which allows for renaming methods, changing signatures and much more.

这篇关于Visual Studio:当其他更改时,是否自动更新C ++ cpp / header文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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