一次偶然机会看见了一种以前没见过的写法,记录下来以后参阅学习。

class NoName{
public:
    NoName():pstring(new std::string), i(0), d(0){}   //new std::string pstring , i = 0 ; d = 0 ;
private:
    std::string * pstring;
    int i;
    double d;
};

相关文章:

  • 2022-12-23
  • 2021-08-21
  • 2022-01-15
  • 2021-06-07
  • 2022-12-23
猜你喜欢
  • 2021-09-27
  • 2021-08-04
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案