blob: bceb2683d54ef1316c276bcfa0ab9dee9cc976d2 [file] [log] [blame]
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +01001#include "examples/cpp/hello-lib.h"
2
Kristina Chodorowf01b2292015-03-02 16:08:28 +00003#include <iostream>
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +01004
Kristina Chodorowf01b2292015-03-02 16:08:28 +00005using std::cout;
6using std::endl;
7using std::string;
8
9namespace hello {
10
Kristina Chodorowf01b2292015-03-02 16:08:28 +000011HelloLib::HelloLib(const string& greeting) : greeting_(new string(greeting)) {
12}
13
14void HelloLib::greet(const string& thing) {
15 cout << *greeting_ << " " << thing << endl;
16}
17
18} // namespace hello