Effective C++ by Meyers Scott

Effective C++ by Meyers Scott

Author:Meyers, Scott
Language: eng
Format: epub
Publisher: Pearson Education
Published: 2011-05-17T04: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.