In this code the constructor is called twice.

How do I avoid that?

If I uncomment the default constructor code block then code does not give satisfactory output..

And I also want conditional based instantiation of template so I used void pointer.

```
#include<iostream.h>
template<class Type>
class Data{
      public:
      Type val;
      Data(Type v){
                cout<<"In Constructor Param";
                val = v;
      }
      Data(){
             //  cout<<"In Constructor Defa";  uncommnet this line
      }
      ~Data(){}
};
int main(){
    Data<void *> obj;
    obj = new Data<float>(31.34f);
    cout<<*(float*)obj.val;
}

```

Output:

```
In Constructor Param
In Constructor Param
31.34

```

Thanks for involving.