   Visual Studio 2005 question
  Quick question: In VS2005, how can I replace the name of a symbol(member variable of function)? Let's say I have a member variable named "position", and I want to change it to "m_position". Of course, I have to replace all the references to it as well, but without replacing other irrelevant occurences of the token "position"  at the same time. How can it be done?   
Quote:Original post by mikemanQuick question: In VS2005, how can I replace the name of a symbol(member variable of function)? Let's say I have a member variable named "position", and I want to change it to "m_position". Of course, I have to replace all the references to it as well, but without replacing other irrelevant occurences of the token "position"  at the same time. How can it be done?Select, right-click, Refactor->Rename...Of course, that's assuming you are actually using a sane language and not C++.   ;  Hmm, I don't get that context menu item.edit: it was a C++ project I checked, worked in VB.NET   ;  Can't do it easily for a C++ project. You'll need to look into regular expressions, perhaps, to perform a complex find-and-replace operation (or two).   ;  "Bookmark all" is your friend. When renaming Class::Foo to Class::Bar, bookmark all the occurrences of Foo in Class.cc and Class.h, and all the occurrences of ::Foo, .Foo, and ->Foo in the rest of the project. Then go through the bookmarks one by one (learn the keyboard shortcuts!), changing as necessary and unbookmarking. Takes a little more time, and is only really relevant to larger projects where there are actual name conflicts which regexes can't handle, but it Works Right The First Time.   