   how to find variable definition that specific class?
  if I wanna find all class A object, how to do?  I wanna find something A object;A * pointer;A otherojbect;etc....   
  I have no idea what you're trying to say. You want to find something? What do you mean find? Something like:typedef find<a,b,d>::type t;Where t will be the first type found? Do you want to add all objects of a specific class to an array? The code you posted doesn't seem to have anything to do with finding the class, as long as A is already declared there should be no problem.   ;  Use your IDE's search feature and type in the class name.   ;  Go to the original definition of class A, right click, and select find all references. (Assuming VS2005);  Change:class A { ... };toclass A_doesnt_exist { ... };and recompile your entire project.  Every time someone refers to class A, it will result in an error.  :)It also generates more error spam.Alternatively, you can add a non-implemented virtual function to A:class A { ...  virtual void not_implemented() = 0;};then any time anyone instantiates an instance of class A, there will be a compiler error.Or, you can use your IDE's tools to find your copies of A.  :)This won't find A* pointer; but it will find pointer = new A();;Quote:Original post by Dave HuntGo to the original definition of class A, right click, and select find all references. (Assuming VS2005)Not foolproof, unfortunately:struct A {};template<bool b> struct Foo{typedef A type;};template<>struct Foo<false>{typedef int type;};typedef A B;int main(){A a;B b;Foo<true>::type c;Foo<false>::type d;}Will only find a, as far as actual instances are concerned. It will find the typedefs, but not the instances using them. As NotAYakk hints, only by compiling the program can you actually find them all.[Edited by - Fruny on June 13, 2006 10:18:26 PM]