I need a static table and based upon the match find in the table i want to execute that corresponding function in the table entry. And those functions i want to keep templated as to handle various data types.
I don't know whether I have made myself clear or not in my last post.
Actually i want to create a static table either map/vector/list/array of type "example". So that in later part of my code i can navigate through its entries.
Incomplete type means that the compiler needs to see the full declaration of the class/struct involved. In this case probably it needs to see the whole of template class test.
Galik,i am not able to compile as mentioned in my last post. And suggested by you that I need to use the whole template class,that also i can not do because i can not include the test.h header in test2.h as test.h header has all teh definitions of the functions in the same file. So compiler gives error to that also.
Got it Galik.its working now. I have one more doubt. what if test.h is included in test2.h and test2.h is included in test.h?
Should that cause problem because i am getting issue doing so. And i have to to do so because of dependencies of each file on other.
Thanks for the reply Galik,i have already done the include guards.
Could you please tell me how to define the vector of the "example".
I am declaring it as below because example is a templated structure. But compiler is giving error :(