Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //biblioteca.cpp
- //Para 100 usuarios
- #include <iostream>
- #include <string>
- using namespace std;
- class usuario;
- class libro{
- private:
- int isbn;
- char* titulo;
- char* autor;
- char* categoria;
- bool estado;
- static int indicel;
- public:
- static int prestamos;
- void alta(int, char*, char*, char*);
- friend void prestamo();
- friend void devolucion();
- friend void check();
- };
- class usuario{
- private:
- char* nombre;
- int cuenta;
- static int indiceu;
- public:
- void alta(char*);
- void mostrar(char*);
- friend void prestamo();
- friend void devolucion();
- };
- void libro :: alta(int isbn, char* titulo, char* autor, char* categoria) //COMO asignar a libro[indice].......Hasta el main que maneja la variable i
- {
- this->isbn=isbn;
- this->titulo=titulo;
- this->autor=autor;
- this->categoria;
- estado=false;
- }
- void check()
- {
- cout<<prestamos; //STATIC
- }
- void usuario :: alta(char* nombre)
- {
- this->nombre=nombre;
- cuenta=0;
- }
- /* void prestamo(char* titulo, char* usuario)
- {
- for(i=0; i<100; i++)
- if (strcmp(titulo, )
- }
- void devolucion(char* titulo, char* usuario)
- {
- }*/
- int libro :: prestamos=0;
- int main ()
- {
- libro array_libros[100];
- usuario array_usuarios[100];
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement