Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "loja.h"
- #include <iostream>
- #include <string>
- /*
- loja::loja(string n = "Sem Nome") {
- cout << "Construindo..." << endl;
- }
- loja::~loja() {
- cout << "Destruindo..." << endl;
- }
- */
- void loja::hello(std::string const &name) {
- std::cout << "Hello, " << name << "!\n";
- }
- ostream &operator<<(ostream &out, const loja &l) {
- out << l.nome << endl;
- return out;
- }
- istream &operator>>(istream &in, loja &l) {
- cout << "Enter the name: ";
- in >> l.nome;
- return in;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement