Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition) by Meyers Scott

Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition) by Meyers Scott

Author:Meyers, Scott [Meyers, Scott]
Language: eng
Format: azw3
Publisher: Pearson Education
Published: 2005-05-11T16:00:00+00:00


#include <string> // standard library components

// shouldn't be forward-declared

#include <memory> // for tr1::shared_ptr; see below

class PersonImpl; // forward decl of Person impl. class

class Date; // forward decls of classes used in

class Address; // Person interface

class Person {

public:

Person(const std::string& name, const Date& birthday,

const Address& addr);

std::string name() const;

std::string birthDate() const;

std::string address() const;

...

private: // ptr to implementation;

std::tr1::shared_ptr<PersonImpl> pImpl; // see Item 13 for info on

}; // std::tr1::shared_ptr



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.