diff --git "a/Ch9\345\206\205\345\255\230\346\250\241\345\236\213\345\222\214\345\220\215\347\247\260\347\251\272\351\227\264/\345\220\215\347\247\260\347\251\272\351\227\264/namesp.h" "b/Ch9\345\206\205\345\255\230\346\250\241\345\236\213\345\222\214\345\220\215\347\247\260\347\251\272\351\227\264/\345\220\215\347\247\260\347\251\272\351\227\264/namesp.h" new file mode 100644 index 0000000000000000000000000000000000000000..b742b53c8d75922c8c5f7b470da56fedf637565c --- /dev/null +++ "b/Ch9\345\206\205\345\255\230\346\250\241\345\236\213\345\222\214\345\220\215\347\247\260\347\251\272\351\227\264/\345\220\215\347\247\260\347\251\272\351\227\264/namesp.h" @@ -0,0 +1,28 @@ +//namesp.h +#include + +//create the pers and debts namespaces + +namespace pers +{ + struct Person + { + std::string fname; + std::string lname; + }; + void getPerson(Person&); + void showPerson(const Person&); +} + +namespace debts +{ + using namespace pers; + struct Debt + { + Person name; + double amount; + }; + void getDebt(Debt&); + void showDebt(const Debt&); + double sumDebts(const Debt arr[], int n); +} \ No newline at end of file