Advertisement
Dagdelo

loja.cpp

Mar 31st, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include "loja.h"
  2. #include <iostream>
  3. #include <string>
  4. /*
  5. loja::loja(string n = "Sem Nome") {
  6.     cout << "Construindo..." << endl;
  7. }
  8.  
  9. loja::~loja() {
  10.     cout << "Destruindo..." << endl;
  11. }
  12. */
  13. void loja::hello(std::string const &name) {
  14.     std::cout << "Hello, " << name << "!\n";
  15. }
  16.  
  17. ostream &operator<<(ostream &out, const loja &l) {
  18.     out << l.nome << endl;
  19.     return out;
  20. }
  21.  
  22. istream &operator>>(istream &in, loja &l) {
  23.     cout << "Enter the name: ";
  24.     in >> l.nome;
  25.     return in;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement