Resharper for C++ Refactoring

Resharper is a neat plugin for VS, and it provides great functionality that simplifies the lives of C++ programmers. It is a very useful tool if you have to work on C++ code-bases.

One important function provided by Resharper is refactoring. That is, the functionality of making structural changes to a certain code element. Typically, refactoring is used to make changes in function arguments of in certain variables.

Here is a sample of useful things you can do with Resharper refactoring capabilities:

Renaming variables: It is very common in programming that the old name of a variable has to change. This happens maybe because the requirements changed, or because the programmer now has a better idea about the responsibilities of that variable. However, changing a variable may be difficult if it appears in several places. That's when a good refactoring tool can help finding all the places where a variable occurs.

Renaming functions: Similarly, we also may have difficulty in renaming a particular function, especially in large projects. In this situation, it is useful to have a tool that is designed to find the correct locations where a function is used and perform this refactoring.

changing the signature of a C++ function: Another important scenario where refactoring is useful is when we need to change the signature of a function. That is, we may want to change the number of parameters or the type of existing parameters. In this case, the Resharper refactoring tool will assist you in locating and making automatic changes to the callers of a function, when necessary.

Reference Books