C++ empty String constructor

后端 未结 7 1897
误落风尘
误落风尘 2021-02-13 02:56

I am a C++ beginner, so sorry if the question is too basic.

I have tried to collect the string constrcturs and try all them out (to remember them).

strin         


        
7条回答
  •  悲&欢浪女
    2021-02-13 03:23

    It considers

    string strA();
    

    as a function declaration.

    For default constructor use:

    string strA;
    

提交回复
热议问题