I\'m new using vs2010 I\'ve read that when you click on a variable its suppose to highlight all the instances of that variable in that file and highlight red or show an error as
I came here from google while looking to do the same thing with Visual Studio 2017 community edition. The answers above point out you can turn this on for VB and C#. The option does not exist for C or C++. ie. for C/C++ the option does not exist in advanced settings so you can not right click the variable and select highlight variable.
However, I learned its simpler for C/C++ to get the equivalent behaviour. Simply double click the variable/function to select it. The editor will highlight all instances of the variable or function in the file. Its not limited by blocks. Its highlighted in the entire file.