python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Why smart pointer type member variable can't be initialized at the declaring place in a class?
When I want to add a member variable with smart pointer type to a class, I found that it can't be initialized at the declaring place:
class Foo {
public:
std::shared_ptr<int> intSharedPtr = n...
Zhang Zheng
Votes: 0
Answers: 1