[ITK-users] Smartpointer as a default parameter for a function

ahmed at mufradat.com ahmed at mufradat.com
Tue Jul 22 03:37:05 EDT 2014


Hello All,

Suppose I have class like

class A{
     public:
     A(int a, ImageType::Pointer ptr){
         // whatever!
     }
};

My question is, what's the default value for that ptr? I'd like to be 
able to create an instance of that class using

A myA(5);

so for the definition of the constructor of A:

A(int a, ImageType::Pointer ptr = WHAT?)

Best regards,
Ahmed


More information about the Insight-users mailing list