Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Created by Julio Tentor <jtentor@fi.unju.edu.ar>
- //
- #include "Libro.h"
- Libro::Libro(std::string const& titulo, std::string const& autor,
- std::string const& editorial, int const& anio, float const& precio) {
- setTitulo(titulo);
- setAutor(autor);
- setEditorial(editorial);
- setAnio(anio);
- setPrecio(precio);
- }
- std::ostream& operator<< (std::ostream& out, const Libro& libro) {
- static_cast<std::ostream&>(out) \
- << "Titulo...: " << libro.getTitulo() << std::endl \
- << "Autor....: " << libro.getAutor() << std::endl \
- << "Editorial: " << libro.getEditorial() << std::endl \
- << "Año......: " << libro.getAnio() << std:: endl \
- << "Precio...: " << libro.getPrecio() << std::endl;
- return out;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement