Alguien podria ayudarme? Gracias [Estructuras][#include <iostream>
Código
#include <math.h> using namespace std; struct Biblioteca { int librocod; char NombreLibro[65]; int Noprestamo; char Nombre[65]; int fecha; }; int main(){ float a; int ope; int c; int pr; char b; char n[65]; int numero, cont = 0; bool continuar; cout<<" Biblioteca Nacional"<<endl; cout<<" Base de datos prestamos libros"<<endl<<endl; struct Biblioteca cod[2]; for(int i=0; i<=1; i++){ cout<<"Ingrese el codigo del libro"<<endl; cin>>cod[i].librocod; cout<<"Ingrese el nombre del libro"<<endl; cin>>cod[i].NombreLibro; cout<<"No.Prestamo"<<endl; cin>>cod[i].Noprestamo; cout<<"Nombre de quien realizo el prestamo"<<endl; cin>>cod[i].Nombre; cout<<"Fecha del prestamo "<<endl; cin>>cod[i].fecha; cout<<endl; system("cls"); } cout<<"***************************************MENU********************************"<<endl; do { continuar = false; cin.clear(); if(cont > 0) cin.ignore(1024, '\n'); cout << " 1.Consulta por nombre de libro, 2.Consulta por no.prestamo, 3.Consulta por nombre)" << endl; cin >> c; cout<<endl; cont++; if(cin.fail() && cin.rdstate()){ cout << "Operacion incorrecta. Vuelva a intentarlo..." << endl; continuar = true; } system("cls"); } while (continuar); system("cls"); switch (c){ case 1: cout<<"Ingrese el nombre del libro"<<endl; cin>>n; for (int e=0; e<=1; e++){ if ((cod[e].NombreLibro)==n){ cout<<"El libro :"<< n <<"se encuentra en nuestra biblioteca"<<endl;} } break; case 2: cout<<"Ingrese el no. de prestamo "<<endl; cin>>pr; for (int t=0; t<=1; t++){ if (pr==(cod[t].Noprestamo)){ cout<<"El libro del numero de prestamo "<< n <<"es:"<<cod[t].NombreLibro<<endl;} } break; } system("pause"); }]
MOD: Usar etiquetas GeSHi.