aboutsummaryrefslogtreecommitdiff
path: root/composite/driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'composite/driver.cxx')
-rw-r--r--composite/driver.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/composite/driver.cxx b/composite/driver.cxx
index cb77acd..aaedf17 100644
--- a/composite/driver.cxx
+++ b/composite/driver.cxx
@@ -24,9 +24,13 @@ main (int argc, char* argv[])
// Create a person object.
//
- unsigned int id;
+ email_address id;
{
- person p ("Joe", "Dirt", "Mr", phone_numbers ("555 5555", "666 6666"));
+ person p ("joe@example.com",
+ "Joe",
+ "Dirt",
+ "Mr",
+ phone_numbers ("555 5555", "666 6666"));
transaction t (db->begin ());
id = db->persist (p);
@@ -57,7 +61,8 @@ main (int argc, char* argv[])
name& n (joe->name ());
- cout << n.title () << " " << n.first () << " " << n.last () << endl;
+ cout << n.title () << " " << n.first () << " " << n.last () << " "
+ << '<' << joe->email ().address () << '>' << endl;
name_extras& ne (n.extras ());