SHARE
TWEET

loja.cpp

Dagdelo Mar 31st, 2019 9 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top