1
0

namesp.h 473 B

123456789101112131415161718192021222324252627
  1. // namesp.h
  2. #include <string>
  3. // create the pers and debts namespaces
  4. namespace pers
  5. {
  6. struct Person
  7. {
  8. std::string fname;
  9. std::string lname;
  10. };
  11. void getPerson(Person &);
  12. void showPerson(const Person &);
  13. }
  14. namespace debts
  15. {
  16. using namespace pers;
  17. struct Debt
  18. {
  19. Person name;
  20. double amount;
  21. };
  22. void getDebt(Debt &);
  23. void showDebt(const Debt &);
  24. double sumDebts(const Debt ar[], int n);
  25. }