Be explicit with the shared pointer type.

This commit is contained in:
Ian Dinwoodie
2019-05-19 18:13:45 -04:00
parent 040aedb6ce
commit f3c4c9555f
2 changed files with 2 additions and 2 deletions

View File

@@ -1825,7 +1825,7 @@ Bitcoin).
// We are going to create the chain: bank->paypal->bitcoin. // We are going to create the chain: bank->paypal->bitcoin.
// First, create the accounts. // First, create the accounts.
std::shared_ptr<Account> bank = std::make_shared<Bank>(100); std::shared_ptr<Bank> bank = std::make_shared<Bank>(100);
std::shared_ptr<Paypal> paypal = std::make_shared<Paypal>(200); std::shared_ptr<Paypal> paypal = std::make_shared<Paypal>(200);
std::shared_ptr<Bitcoin> bitcoin = std::make_shared<Bitcoin>(300); std::shared_ptr<Bitcoin> bitcoin = std::make_shared<Bitcoin>(300);

View File

@@ -76,7 +76,7 @@ int main()
// We are going to create the chain: bank->paypal->bitcoin. // We are going to create the chain: bank->paypal->bitcoin.
// First, create the accounts. // First, create the accounts.
std::shared_ptr<Account> bank = std::make_shared<Bank>(100); std::shared_ptr<Bank> bank = std::make_shared<Bank>(100);
std::shared_ptr<Paypal> paypal = std::make_shared<Paypal>(200); std::shared_ptr<Paypal> paypal = std::make_shared<Paypal>(200);
std::shared_ptr<Bitcoin> bitcoin = std::make_shared<Bitcoin>(300); std::shared_ptr<Bitcoin> bitcoin = std::make_shared<Bitcoin>(300);