2

i have been going through the source code of an application which i downloaded from sourceforge.

i have a certain method which requires a pointer to an abstract class as a parameter.

class A;//abstract class
B::method(A *)

i cant create an object of A since its abstract.

so i can only pass pointer to object of child class of A in the B::method().

Now the problem is there are many classes in the source.

my problem is that how do i know which are the child classes of a parent class in visual studio 2010?

i have tried "find all references" for a virtual method of the abstract class (because its definition should be in the child class!) but without luck.

hope i could make my question clear!

Oded
  • 489,969
  • 99
  • 883
  • 1,009
Cool_Coder
  • 4,888
  • 16
  • 57
  • 99
  • @TobiasLangner i just want to know the child classes of a parent class. is there any option in visual studio by which i can get all the child classes of a parent class? – Cool_Coder Jun 02 '12 at 19:51
  • possible duplicate of [Visual Studio: How do I show all classes inherited from a base class?](http://stackoverflow.com/questions/282377/visual-studio-how-do-i-show-all-classes-inherited-from-a-base-class) – Hakan Serce Jun 02 '12 at 19:53
  • @vizier that is for .net & this is for C++. :p – Cool_Coder Jun 02 '12 at 20:02

1 Answers1

1

Maybe "Solution Explorer" -> Your project -> Right Click Menu -> "Class Diagram" is what you're looking for ?

Another suggestion - try looking for " : public YourBaseClassName" strings and then "unwind" the inheritance. The usability certainly depends on the depth of your hierarchy. If there are multiple intermediate classes or multiple inheritance, then... Maybe, look at Eclipse+CDT ?

Viktor Latypov
  • 14,289
  • 3
  • 40
  • 55
  • may be thats what i am looking for. but i cant find it on my MSVS2010 EXPRESS edition. any another way to find this in the express edition? – Cool_Coder Jun 02 '12 at 20:07