Hello everyone !
I think i've solved the problem.
like this :
Code:
template <class myType>
void TestEmpty(myType object);
I want to implement my own exception class, and i need to define a method with a generic parameter.
something like this:
Code:
void Test_Empty(T object) {
if (obj==NULL) /* the object type is unknown at compilation time*/
cout<< "No data exception";
}
The problem is that I do not know how to define a default type parameter of my test function.
Once it can be of type int, other wise of type float for instance.
Can you please give me some suggestions.