title: "Go to Definition"/"Go to Declaration" not working reliably in VS2010?
body: <p>I wanted to start contributing to an open source C++ project recently. Only having little experience with C++, I chose Visual Studio as IDE, updated with SP1. I got the solution to build relatively easily and wanted to navigate the code a little to get an overview.</p>
  
  <p>This is when I noticed that sometimes "Go to Definition"/"Go to declaration" doesn't work. Both options are available when I right-click on a symbol in the source code, but when I'm in the header file, "Go to Definition" only takes me to the declaration again for those functions that are concerned. And when I'm in the .cc file, I always get taken to the definition in the same file.</p>
  
  <p>Some more things I've noticed about the functions which are concerned by this are:</p>
  
  <p>1) for some functions, I can navigate to the definition from the header file, but the other direction is broken</p>
  
  <p>2) navigation for some functions can be fixed if the declaration is changed to completely match the definition, e.g.</p>
  
  <pre><code>header declaration:
      void buche(sint64 betrag, player_cost type);
  source definition:
      void karte_t::buche(sint64 const betrag, player_cost const type)
  </code></pre>
  
  <p>change to</p>
  
  <pre><code>header declaration:
      void buche(sint64 const betrag, player_cost const type);
  </code></pre>
  
  <p>-> navigation works in both directions</p>
  
  <p>3) when clicking into a code block of a concerned function in the source file, the scope menu at the top changes to "(Global Scope)" instead of showing the little arrow to the right (which is the symbol for a forward declaration I think?) and the class name (but those functions are definitely class members)</p>
  
  <p>I've searched around a lot and this seems to be a relatively well-known problem. There's a thread here on the site: <a href="https://stackoverflow.com/questions/39474/how-to-get-intellisense-to-reliably-work-in-visual-studio-2008">How to get IntelliSense to reliably work in Visual Studio 2008</a></p>
  
  <p>I also found several threads on the Microsoft forums (which I can't link as I'm only allowed to post two hyperlinks), but no official confirmation of a bug or something.</p>
  
  <p>The quintessence of the replies I found is that one should delete the .ncb file (which has been superseded by an .sdf database in VS2010 as I understand it), or use the option to rebuild the database on loading the solution. I did all of that multiple times, to no avail. The highest rated reply on the thread here on Stackoverflow seems to implicate that this is simply a bug (of Intellisense - did I get it right that it's this autocomplete component which is also responsible for the code navigation?) one has to accept, suggesting to use <a href="http://www.wholetomato.com/" rel="nofollow noreferrer">Visual Assist</a> instead, however the question was about VS2008 then and one reply pointed to VS2010 improving on this. Another reply blamed recursive references, but I -think- this is not a problem in this project as all the files (certainly those few I've checked and encountered the problems with) have include guards. It has also been confirmed to me by one coder of that project that he has the same problems. But I'm not so keen on spending money on Visual Assist, it's only meant to be a little hobby ...</p>
  
  <p>Having a lot of experience with Eclipse/Java, it just seems weird to me that such a relatively essential feature of an IDE doesn't work reliably. Of course I can understand that static code analysis is much more difficult for C++ than for Java. But then again, Visual Studio is a commercial product which has had a lot of development cycles.</p>
  
  <p>So to sum this post up, is this an unavoidable bug?</p>