title: Is there any tool / way to detect/remove all unused variables,macros,headers(includes) and functions from c++ code?
body: <p>I had to customize some projects which have been written for some other purpose but some core functionality is same for my project and works as it is. But There are lots of variables, macros,functions etc.. which are not useful for my current context and they are just making the code very uneasy to read and unnecessarily big.</p>
  
  <p>So I started removing the variables macros functions etc.. by using "Find References" and "Show Call Graph" in Netbeans. I'm using netbeans remote development tools for c/c++.
  But its cumbersome. So Is there any tool to do this clean up??</p>