views:

78

answers:

1

In C++, the common practice is to declare functions in header files and define them in cpp files. This leads to always having two copies of every function's prototype. Then whenever I want to change a function's name/return value/parameter, I have to manually change it in both files. This seems unnecessarily tedious and there must be lots of people that share my pain, so is there a way to automate these changes between files in VS?

Bonus points for vim solutions as well.

+5  A: 

You can use the Visual Assist X add-in for Visual Studio. One of its feature is to do what you want: Modify the signature of a function in the base class and let it modify all signature of the same function in the cpp file and in derived classes. This add-in is not free but you can try the trial.

Patrice Bernassola
If you're a serious C++ programmer, I highly recommend VA X - it makes VS work the way it was supposed to.
foxwoods