C++: how to choose the constructor depending on the condition?

后端 未结 5 1423
长发绾君心
长发绾君心 2021-01-24 19:30

Assume I have a class with different constructors:

class A
{
public:
    A(char* string)
    {
        //...
    }

    A(int value)
    {
        //..
    }

           


        
5条回答
提交回复
热议问题