Can Visual Studio manage function prototypes for me in C ++ header files?

In C ++, a common practice is to declare functions in header files and define them in cpp files. This leads to the fact that there are always two copies of each function prototype. Then when I want to change the function name / return value / parameter, I need to manually change it in both files. This seems unnecessarily tedious and there must be a lot of people sharing my pain, so is there a way to automate these cross-file changes in VS?

Bonus points for vim solutions.

+2


a source to share


1 answer


You can use the Visual Assist X add-in for Visual Studio. One of its functions is to do what you want: Change the signature of a function in the base class and let it change the entire signature of the same function in the cpp file and in derived classes. This add-on is not free, but you can try the trial version.



+5


a source







All Articles