need help in lib management project

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2009
Posts: 4
Reputation: maddy05 is an unknown quantity at this point 
Solved Threads: 0
maddy05 maddy05 is offline Offline
Newbie Poster

need help in lib management project

 
0
  #1
Jan 24th, 2009
this is a project made by me but its issue function is not working well instead of modifying and changing the value of issue to 2 it is adding another book with issue 2 in the file can some one correct it

// **library management** //
// **library members can add,delete,modify and search book** //
// **library members can operate users account** //
// **user can manage his record,issue and return a book** //
// **user can take only 1 book at a time** //


  1. #include<fstream.h>
  2. #include<iostream.h>
  3. #include<conio.h>
  4. #include<string.h>
  5. #include<stdio.h>
  6. #include<process.h>
  7. #include<math.h>
  8. #include<dos.h>
  9. #include<graphics.h>
  10. #include<iomanip.h>
  11. #include<stdlib.h>
  12.  
  13.  
  14.  
  15.  
  16. void mainmenu(void);
  17.  
  18.  
  19.  
  20.  
  21. struct libdate // *defining date* //
  22. {
  23. int day;
  24. int month;
  25. int year;
  26. };
  27.  
  28.  
  29.  
  30. struct address // *defining address* //
  31. {
  32. int hno ;
  33. char area[100];
  34. char city[100];
  35. long int pincode;
  36. };
  37.  
  38.  
  39. class book // *defining class book* //
  40. {
  41. int bcode;
  42. char bname[100];
  43. char author[100];
  44. char category[100];
  45. int issue;
  46. libdate doe; // *structure as class member* //
  47.  
  48. public :
  49.  
  50. void modify(void);
  51.  
  52. int getissue()
  53. {
  54. return issue;
  55. }
  56.  
  57. void cissuey(void)
  58. {
  59. issue=1;
  60. }
  61.  
  62. void cissuen(void)
  63. {
  64. issue=2;
  65. }
  66.  
  67. void getdata(void)//*inputing data* //
  68. {
  69. int gdriver = EGA, gmode = EGAHI;
  70. int bkcol, maxcolor,color;
  71. initgraph(&gdriver, &gmode,"");
  72. maxcolor = getmaxcolor();
  73. bkcol=maxcolor=6;
  74. setbkcolor(bkcol);
  75. color=maxcolor;
  76. setcolor(color);
  77. cout<<"ENTER NAME:"<<endl;
  78. gets(bname);
  79. cout<<"ENTER CODE :"<<endl;
  80. cin>>bcode;
  81. cout<<"AUTHOR NAME :"<<endl;
  82. gets(author);
  83. cout<<"CATEGORY :"<<endl;
  84. gets(category);
  85. cout<<"DATE OF ENTRY "<<endl;
  86. {
  87. cout<<"DAY:"<<endl;
  88. cin>>doe.day;
  89. cout<<"MONTH :"<<endl;
  90. cin>>doe.month;
  91. cout<<"YEAR :"<<endl;
  92. cin>>doe.year;
  93. }
  94. cout<<"the current status of the book is unissued by default so enter 1"<<endl;
  95. cin>>issue;
  96. }
  97. void putdata(void)
  98. {
  99. int gdriver = EGA, gmode = EGAHI;
  100. int bkcol, maxcolor,color;
  101. initgraph(&gdriver, &gmode,"");
  102. maxcolor = getmaxcolor();
  103. bkcol=maxcolor=6;
  104. setbkcolor(bkcol);
  105. color=maxcolor;
  106. setcolor(color);
  107. cout<<" "<<bname<<" has the code "<<bcode<<endl;
  108. cout<<" written by "<<author<<endl;
  109. cout<<" is currently in the category "<<category<<endl;
  110. cout<<" is entered in library on "<<doe.day<<"."<<doe.month<<"."<<doe.year<<endl;
  111. cout<<" the current status of the book is "<<issue<<endl;
  112. getch();
  113. }
  114.  
  115. char*getauthname()
  116. {
  117. return author;
  118. }
  119.  
  120. int getbcode(void)
  121. {
  122. return bcode;
  123. }
  124.  
  125. };
  126.  
  127. book b1,b2;
  128.  
  129.  
  130. void book::modify(void) //*to modify a book record*//
  131. {
  132. int gdriver = EGA, gmode = EGAHI;
  133. int bkcol, maxcolor,color;
  134. initgraph(&gdriver, &gmode,"");
  135. maxcolor = getmaxcolor();
  136. bkcol=maxcolor=2;
  137. setbkcolor(bkcol);
  138. color=maxcolor;
  139. setcolor(color);
  140. cout<<" "<<bname<<" has the code "<<bcode<<endl;
  141. cout<<" written by "<<author<<endl;
  142. cout<<" is currently in the category "<<category<<endl;
  143. cout<<" is entered in library on "<<doe.day<<"."<<doe.month<<"."<<doe.year<<endl;
  144. cout<<" the current status of the book is "<<issue<<endl;
  145.  
  146. cout<<"enter new details"<<endl;
  147. int mbc;
  148. char an[100],cat[100],nm[100];
  149. date dot;
  150. cout<<"enter new details"<<endl;
  151. cout<<"enter the new book code:(enter 1 to retain old one)"<<endl;
  152. cin>>mbc;
  153. cout<<"enter the new name:(press '.' to retain old one)"<<endl;
  154. gets(nm);
  155. cout<<"enter the new author:(press '.' to retain old one)"<<endl;
  156. gets(an);
  157. cout<<"enter the new category:(press '.' to retain old one)"<<endl;
  158. gets(cat);
  159. if(strcmp(nm,".")!=0)
  160. strcpy(bname,nm);
  161. if(strcmp(an,".")!=0)
  162. strcpy(author,an);
  163. if(strcmp(cat,".")!=0)
  164. strcpy(category,cat);
  165. if(mbc!=1)
  166. bcode=mbc;
  167. }
  168.  
  169.  
  170. int searchbook(void) //*to search a book*//
  171. {
  172. int gdriver = EGA, gmode = EGAHI;
  173. int bkcol, maxcolor,color;
  174. initgraph(&gdriver, &gmode,"");
  175. maxcolor = getmaxcolor();
  176. bkcol=maxcolor=5;
  177. setbkcolor(bkcol);
  178. color=maxcolor;
  179. setcolor(color);
  180. ifstream finbook;
  181. finbook.open("lib.dat",ios::in|ios::binary);
  182. finbook.seekg(0,ios::beg);
  183. int n,m,choice;
  184. char found='n';
  185. char*mc;
  186. cout<<"for searching through book code press 1 or by author name press 2"<<endl;
  187. cin>>choice;
  188. switch(choice)
  189. {
  190. case 1:
  191. {
  192. cout<<"enter the book code to be searched"<<endl;
  193. cin>>m;
  194. while(!finbook.eof())
  195. {
  196. finbook.read((char*) &b1,sizeof(b1));
  197. if(b1.getbcode()==m)
  198. {
  199. b1.putdata();
  200. getch();
  201. found='y';
  202. return b1.getbcode();
  203. finbook.close();
  204. mainmenu();
  205. }
  206. }
  207. if(found=='n')
  208. cout<<"above book is not present in library!!"<<endl;
  209. getch();
  210. finbook.close();
  211. return 0;
  212. mainmenu();
  213. }
  214. case 2:
  215. {
  216. cout<<"enter the author's name for searching book"<<endl;
  217. gets(mc);
  218. while(!finbook.eof())
  219. {
  220. finbook.read((char*)&b1,sizeof(b1));
  221. if(strcmpi(mc,b1.getauthname())==0)
  222. {
  223. b1.putdata();
  224. getch();
  225. found='y';
  226. return b1.getbcode();
  227. finbook.close();
  228. mainmenu();
  229. break;
  230. }
  231. }
  232. if(found=='n')
  233. cout<<"above book is not present in library!!"<<endl;
  234. getch();
  235. finbook.close();
  236. mainmenu();
  237. return 0;
  238. }
  239. }
  240. }
  241.  
  242.  
  243. void addbook(void) //* add a book* //
  244. {
  245. int gdriver = EGA, gmode = EGAHI;
  246. int bkcol, maxcolor,color;
  247. initgraph(&gdriver, &gmode,"");
  248. maxcolor = getmaxcolor();
  249. bkcol=maxcolor=10;
  250. setbkcolor(bkcol);
  251. color=maxcolor;
  252. setcolor(color);
  253. ofstream foutbook("lib.dat",ios::app|ios::binary);
  254. {
  255. char ans='y';
  256. while(ans=='y')
  257. {
  258. b1.getdata();
  259. foutbook.write((char*) &b1,sizeof(b1));
  260. cout<<"record added to library.\n"<<endl;
  261. cout<<"do you want to enter more records?(y/n).."<<endl;
  262. cin>>ans;
  263. }
  264. }
  265.  
  266. foutbook.close();
  267. mainmenu();
  268. }
  269.  
  270.  
  271. void deletebook(void) //*to delete an existing book* //
  272. {
  273. int gdriver = EGA, gmode = EGAHI;
  274. int bkcol, maxcolor,color;
  275. initgraph(&gdriver, &gmode,"");
  276. maxcolor = getmaxcolor();
  277. bkcol=maxcolor=12;
  278. setbkcolor(bkcol);
  279. color=maxcolor;
  280. setcolor(color);
  281. ifstream finbook;
  282. ofstream foutbook;
  283. finbook.open("lib.dat",ios::in);
  284. foutbook.open("temp.dat",ios::out);
  285. int bcode;
  286. char found='f',confirm='n';
  287. cout<<"enter the book code of the book which has to be deleted from library"<<endl;
  288. cin>>bcode;
  289. while(!finbook.eof())
  290. {
  291. finbook.read((char*) &b1,sizeof(b1));
  292. if(b1.getbcode()==bcode)
  293. {
  294. b1.putdata();
  295. found='t';
  296. cout<<"want to delete,sure?(y/n).."<<endl;
  297. cin>>confirm;
  298. if(confirm=='n')
  299. foutbook.write((char*) &b1,sizeof(b1));
  300. }
  301. else
  302. foutbook.write((char*) &b1,sizeof(b1));
  303. }
  304. {
  305. if(found=='f')
  306. cout<<"record not found!!\n";
  307. getch();
  308. }
  309. getch();
  310. finbook.close();
  311. foutbook.close();
  312. remove("lib.dat");
  313. rename("temp.dat","lib.dat"); //* old file is removed and temp is renamed *//
  314. finbook.open("lib.dat",ios::in);
  315. cout<<"record updated"<<endl;
  316. cout<<"now the file contains"<<endl;
  317. getch();
  318. while(!finbook.eof())
  319. {
  320. finbook.read((char*)&b2,sizeof(b2));
  321. if(finbook.eof())
  322. break;
  323. b2.putdata();
  324. getch();
  325.  
  326. }
  327. finbook.close();
  328. mainmenu();
  329. }
  330.  
  331.  
  332. void modifybook(void) //* to modify a book record in library* //
  333. {
  334. int bcd;
  335. long pos;
  336. char found='f';
  337. cout<<"enter the code of the book which has to be modified"<<endl;
  338. cin>>bcd;
  339. fstream fio("lib.dat",ios::in|ios::out|ios::binary);
  340. fio.seekg(0,ios::beg);
  341. while(!fio.eof())
  342. {
  343. pos=fio.tellg();
  344. fio.read((char*)&b1,sizeof(b1));
  345. if(b1.getbcode()==bcd)
  346. {
  347. b1.modify();
  348. fio.seekg(pos); //*file pointer positioned to beginning position of record being modified,before writing back modified record*//
  349. fio.write((char*)&b1,sizeof(b1));
  350. found='t';
  351. break;
  352. }
  353. }
  354. if(found=='f')
  355. cout<<"record not found!!"<<endl;
  356. fio.seekg(0);
  357. cout<<"now the file contains"<<endl;
  358. while(!fio.eof())
  359. {
  360. fio.read((char*) &b2,sizeof(b2));
  361. b2.putdata();
  362. getch();
  363. mainmenu();
  364. }
  365. }
  366.  
  367.  
  368. void dispallbook(void)
  369. {
  370. ifstream finbook;
  371. finbook.open("lib.dat",ios::in|ios::binary);
  372. finbook.seekg(0,ios::beg);
  373. cout<<"file contains"<<endl;
  374. while(!finbook.eof())
  375. {
  376. finbook.read((char*)&b2,sizeof(b2));
  377. if(finbook.eof())
  378. {
  379. break;
  380. }
  381. else
  382. b2.putdata();
  383. getch();
  384. }
  385. finbook.close();
  386. mainmenu();
  387. }
  388.  
  389.  
  390. class account
  391. {
  392. int id;
  393. char name[100];
  394. int status;
  395. address haddress;
  396.  
  397. public:
  398. libdate doi,doer;
  399.  
  400. int bid;
  401.  
  402. libdate dor;
  403.  
  404. int getid(void)
  405. {
  406. return id;
  407. }
  408.  
  409. int getstatus(void)
  410. {
  411. return status;
  412. }
  413.  
  414. void cstatusy(void)
  415. {
  416. status=1;
  417. }
  418.  
  419. void cstatusn(void)
  420. {
  421. status=2;
  422. }
  423.  
  424.  
  425. void enterdata(void) //*entering the data of user*//
  426. {
  427. cout<<"enter the name of the user"<<endl;
  428. gets(name);
  429. cout<<"enter the library ID"<<endl;
  430. cin>>id;
  431. cout<<"enter the address of the user"<<endl;
  432. {
  433. cout<<"enter the house no."<<endl;
  434. cin>>haddress.hno;
  435. cout<<"enter the area in which the user is currently living"<<endl;
  436. gets(haddress.area);
  437. cout<<"enter the city in which the user is currently living"<<endl;
  438. gets(haddress.city);
  439. cout<<"enter the pincode of the city"<<endl;
  440. cin>>haddress.pincode;
  441. }
  442. cout<<"enter the date of entry"<<endl;
  443. {
  444. cout<<"enter the day"<<endl;
  445. cin>>doer.day;
  446. cout<<"enter the month"<<endl;
  447. cin>>doer.month;
  448. cout<<"enter the year"<<endl;
  449. cin>>doer.year;
  450. }
  451. cout<<"defualt value of status is 1 so enter 1"<<endl;
  452. cin>>status;
  453. }
  454.  
  455.  
  456. void display(void)
  457. {
  458. int gdriver = EGA, gmode = EGAHI;
  459. int bkcol, maxcolor,color;
  460. initgraph(&gdriver, &gmode,"");
  461. maxcolor = getmaxcolor();
  462. bkcol=maxcolor=2;
  463. setbkcolor(bkcol);
  464. color=maxcolor;
  465. setcolor(color);
  466. cout<<name<<" has the library ID "<<id<<endl;
  467. cout<<" who currently lives in "<<endl;
  468. cout<<haddress.hno<<" "<<haddress.area<<" "<<haddress.city<<endl;
  469. cout<<haddress.pincode<<endl;
  470. }
  471.  
  472.  
  473. void modifyuser(void)
  474. {
  475. cout<<name<<"has the id"<<id<<"living in"<<haddress.hno<<" "<<haddress.area<<" "<<haddress.city<<" "<<haddress.pincode<<endl;
  476. cout<<"enter new details"<<endl;
  477. char nm[100];
  478. int idc;
  479. address ha;
  480. cout<<"enter the new name(press '.' to retain old one)"<<endl;
  481. gets(nm);
  482. cout<<"enter the new id(press 1 to retain old one)"<<endl;
  483. cin>>idc;
  484. cout<<"enter the new address"<<endl;
  485. {
  486. cout<<"enter the new homeno(press 2 to retain old one)"<<endl;
  487. cin>>ha.hno;
  488. cout<<"enter the new area(press '.' to retain old one)"<<endl;
  489. gets(ha.area);
  490. cout<<"enter the new city(press '.' to retain old one)"<<endl;
  491. gets(ha.city);
  492. cout<<"enter the new pincode.(press '3' to retain old one"<<endl;
  493. cin>>ha.pincode;
  494. }
  495. if(strcmp(nm,".")!=0)
  496. strcpy(name,nm);
  497. if(strcmp(ha.area,".")!=0)
  498. strcpy(haddress.area,ha.area);
  499. if(strcmp(ha.city,"."))
  500. strcpy(haddress.city,ha.city);
  501. if(idc!=1)
  502. id=idc;
  503. if(ha.hno!=2)
  504. haddress.hno=ha.hno;
  505. if(ha.pincode!=3)
  506. haddress.pincode=ha.pincode;
  507. }
  508. };
  509. account s1,s2;
  510.  
  511.  
  512. void adduser(void) //*add a user*//
  513. {
  514. ofstream foutuser;
  515. foutuser.open("user.dat",ios::app|ios::binary);
  516. char ans='y';
  517. while(ans=='y')
  518. {
  519. s1.enterdata();
  520. foutuser.write((char*)&s1,sizeof(s1));
  521. cout<<"user added to library"<<endl;
  522. cout<<"do you want to enter more users?(y/n).."<<endl;
  523. cin>>ans;
  524. }
  525. foutuser.close();
  526. mainmenu();
  527. }
  528.  
  529.  
  530. void searchuser(void) //*to search a user*//
  531. {
  532. ifstream finuser;
  533. finuser.open("user.dat",ios::in|ios::binary);
  534. finuser.seekg(0,ios::beg);
  535. int uid;
  536. char found='n';
  537. cout<<"enter the library ID of the user to be searched"<<endl;
  538. cin>>uid;
  539. while(!finuser.eof())
  540. {
  541. finuser.read((char*)&s1,sizeof(s1));
  542. if(s1.getid()==uid)
  543. {
  544. s1.display();
  545. getch();
  546. found='y';
  547. mainmenu();
  548. }
  549. }
  550. if(found=='n')
  551. cout<<"user not registered"<<endl;
  552. getch();
  553. finuser.close();
  554. mainmenu();
  555. }
  556.  
  557.  
  558. void deleteuser(void)
  559. {
  560. ifstream fio("user.dat",ios::in|ios::binary);
  561. ofstream file("temp.dat",ios::out|ios::binary);
  562. int uid;
  563. char found='f',confirm='n';
  564. cout<<"enter the ID of the user whom you want to delete"<<endl;
  565. cin>>uid;
  566. while(!fio.eof())
  567. {
  568. fio.read((char*) &s1,sizeof(s1));
  569. if(s1.getid()==uid)
  570. {
  571. s1.display();
  572. found='t';
  573. cout<<"want to continue sure(y/n).."<<endl;
  574. cin>>confirm;
  575. if(confirm=='n')
  576. file.write((char*)&s1,sizeof(s1));
  577. }
  578. else
  579. file.write((char*)&s1,sizeof(s1));
  580. }
  581. if(found=='f')
  582. cout<<"user not found!!"<<endl;
  583. getch();
  584. fio.close();
  585. file.close();
  586. remove("user.dat");
  587. rename("temp.dat","user.dat");
  588. fio.open("lib.dat",ios::in|ios::binary);
  589. cout<<"record updated"<<endl;
  590. cout<<"now the file contains"<<endl;
  591. getch();
  592. while(!fio.eof())
  593. {
  594. fio.read((char*) &s2,sizeof(s2));
  595. if(fio.eof())
  596. break;
  597. s2.display();
  598. getch();
  599. }
  600. mainmenu();
  601. fio.close();
  602. }
  603.  
  604.  
  605. void modifyaccount(void)
  606. {
  607. fstream fio("user.dat",ios::in|ios::out|ios::binary);
  608. int uid;
  609. long pos;
  610. char found='f';
  611. fio.seekg(0,ios::beg);
  612. cout<<"enter the id of the user whose record is to be modified"<<endl;
  613. cin>>uid;
  614. while(!fio.eof())
  615. {
  616. pos=fio.tellg();
  617. fio.read((char*)&s1,sizeof(s1));
  618. if(s1.getid()==uid)
  619. {
  620. s1.modifyuser();
  621. fio.seekg(pos);
  622. fio.write((char*)&s1,sizeof(s1));
  623. found='t';
  624. break;
  625. }
  626. }
  627. if(found=='f')
  628. cout<<"record not found!!"<<endl;
  629. fio.seekg(0);
  630. cout<<"now the user file contains"<<endl;
  631. while(!fio.eof())
  632. {
  633. fio.read((char*)&s2,sizeof(s2));
  634. s2.display();
  635. getch();
  636. }
  637. mainmenu();
  638. fio.close();
  639. }
  640.  
  641. void issuebook(void)
  642. {
  643. char ch;
  644. int m,n,uid;
  645. int rec1=0,rec2=0;
  646. libdate temp;
  647. cout<<"Enter ur library ID"<<endl;
  648. cin>>uid;
  649. fstream iofile("user.dat",ios::in|ios::app|ios::binary);
  650. fstream ifile("lib.dat",ios::in|ios::app|ios::binary);
  651. while(!iofile.eof())
  652. {
  653. if(iofile.eof())
  654. {
  655. mainmenu();
  656. }
  657. iofile.read((char*)&s1,sizeof(s1));
  658. rec1++;
  659. if(uid==s1.getid())
  660. {
  661. n=s1.getstatus();
  662. if(n==2)
  663. {
  664. cout<<"you already have issued one book"<<endl;
  665. getch();
  666. mainmenu();
  667. }
  668. else
  669. cout<<".....Search the book you want to issue"<<endl;
  670. getch();
  671. int bbcode = searchbook();
  672. while(bbcode!=0)
  673. {
  674. cout<<"are u sure u want to take this book(y/n)"<<endl;
  675. cin>>ch;
  676. if(ch=='y'||ch=='Y')
  677. {
  678. while(!ifile.eof())
  679. {
  680. if(ifile.eof())
  681. {mainmenu();}
  682. ifile.read((char*)&b1,sizeof(b1));
  683. rec2++;
  684. if(bbcode==b1.getbcode())
  685. {
  686. m=b1.getissue();
  687. if(m==2)
  688. {
  689. cout<<"Already issued...\n";
  690. mainmenu();
  691. }
  692. else
  693. s1.bid=bbcode;
  694. cout<<"ENTER THE DATE OF ISSUE"<<endl;
  695. {
  696. cout<<"ENTER THE DAY"<<endl;
  697. cin>>temp.day;
  698. cout<<"ENTER THE MONTH"<<endl;
  699. cin>>temp.month;
  700. cout<<"ENTER THE YEAR"<<endl;
  701. cin>>temp.year;
  702. }
  703. s1.doi=temp;
  704. b1.cissuen();
  705. s1.cstatusn();
  706. iofile.seekg((rec1-1)*sizeof(s1),ios::beg);
  707. ifile.seekg((rec2-1)*sizeof(b1),ios::beg);
  708. ifile.write((char*)&b1,sizeof(book));
  709. iofile.write((char*)&s1,sizeof(account));
  710. cout<<" Status updated..\n";
  711. getch();
  712. }
  713. }
  714. ifile.close();
  715. mainmenu();
  716. }
  717. else
  718. {
  719. cout<<"SORRY u can search some other time"<<endl;
  720. ifile.close();
  721. iofile.close();
  722. getch();
  723. mainmenu();
  724. }
  725. }
  726. }
  727. else
  728. cout<<"WRONG ID ENTERED!!!..PLZ ENTER YOUR VALID ID"<<endl;
  729. iofile.close();
  730. getch();
  731. mainmenu();
  732. }
  733. iofile.close();
  734. }
  735.  
  736.  
  737.  
  738.  
  739.  
  740. void returnbook(void) //* to return a book from user * //
  741. {
  742. int uid,bbcode;
  743. int m;
  744. libdate temp;
  745. m=b1.getissue();
  746. cout<<"ENTER UR LIBRARY ID"<<endl;
  747. cin>>uid;
  748. fstream iofile("user.dat",ios::in|ios::app|ios::binary);
  749. fstream ifile("lib.dat",ios::in|ios::app|ios::binary);
  750. while(iofile)
  751. {
  752. iofile.read((char*)&s1,sizeof(s1));
  753. if(uid==s1.getid())
  754. {
  755. cout<<"valid ID....."<<endl;
  756. cout<<"enter the book code of the book u want to return"<<endl;
  757. cin>>bbcode;
  758. while(ifile)
  759. {
  760. ifile.read((char*)&b1,sizeof(b1));
  761. if(bbcode==b1.getbcode())
  762. {
  763. cout<<"book found checking its status"<<endl;
  764. getch();
  765. if(m==2)
  766. {
  767.  
  768. cout<<"calculating fine"<<endl;
  769. {
  770. int m,n,p;
  771. if(s1.dor.year==s1.doi.year)
  772. {
  773. if(s1.dor.month==s1.doi.month)
  774. {
  775. if(s1.dor.day-s1.doi.day<4)
  776. {
  777. cout<<"you do not have to pay any fine"<<endl;
  778. }
  779. else
  780. m=s1.dor.day-s1.doi.day;
  781. cout<<"you have to pay a fine of rs."<<m;
  782. }
  783. else
  784. {
  785. if(s1.dor.month-s1.doi.month==1)
  786. {
  787. n=30-s1.doi.day;
  788. if(n+s1.dor.day<4)
  789. {
  790. cout<<"you do not have to pay any fine"<<endl;
  791. }
  792. else
  793. cout<<"you have to pay a fine of rs."<<n+s1.dor.day<<endl;
  794. }
  795. else
  796. cout<<"you have to pay a fine of rs. 200"<<endl;
  797. }
  798. }
  799. else
  800. {
  801. if(s1.dor.year-s1.doi.year==1)
  802. {
  803. if((s1.doi.month==12)&&(s1.dor.month==1))
  804. {
  805. p=30-s1.doi.day;
  806. if(p+s1.dor.day<4)
  807. {
  808. cout<<"you do not have to pay any fine"<<endl;
  809. }
  810. else
  811. cout<<"you have to pay the fine of"<<p+s1.dor.day;
  812. }
  813. else
  814. cout<<"you have to pay the fine of rs. 200"<<endl;
  815. }
  816. else
  817. cout<<"you have to pay the fine of rs. 500"<<endl;
  818. }
  819. }
  820. cout<<"now changing the status of this book"<<endl;
  821. getch();
  822. b1.cissuey();
  823. s1.cstatusy();
  824. cout<<"ENTER THE DATE OF RETURN"<<endl;
  825. {
  826. cout<<"ENTER THE DAY"<<endl;
  827. cin>>temp.day;
  828. cout<<"ENTER THE MONTH"<<endl;
  829. cin>>temp.month;
  830. cout<<"ENTER THE YEAR"<<endl;
  831. cin>>temp.year;
  832. }
  833. s1.dor=temp;
  834. ifile.write((char*)&b1,sizeof(b1));
  835. iofile.write((char*)&s1,sizeof(s1));
  836. mainmenu();
  837. }
  838. else
  839. cout<<"error!this book is free to issue"<<endl;
  840. getch();
  841. mainmenu();
  842. }
  843. else
  844. cout<<"u haven't issued this book kindly check the book id again"<<endl;
  845. getch();
  846. mainmenu();
  847. }
  848. ifile.close();}
  849. else
  850. cout<<"WRONG USER ID ENTRED CHECK AGAIN"<<endl;
  851. getch();
  852. mainmenu();
  853. }
  854. iofile.close();
  855. }
  856.  
  857. void record(void)
  858. {
  859. int m;
  860. int uid,ubcode;
  861. m=s1.getstatus();
  862. fstream iofile("user.dat",ios::in|ios::app|ios::binary);
  863. while(iofile)
  864. {
  865. iofile.read((char*)&s1,sizeof(s1));
  866. cout<<"Enter your valid library ID"<<endl;
  867. cin>>uid;
  868. if(uid==s1.getid())
  869. {
  870. cout<<"valid ID....checking ur record.."<<endl;
  871. getch();
  872. if(m==1)
  873. {
  874. cout<<"you have not taken any book currently"<<endl;
  875. getch();
  876. mainmenu();
  877. }
  878. else
  879. {
  880. cout<<"you have taken the following book"<<endl;
  881. getch();
  882. ubcode=s1.bid;
  883. ifstream ifile;
  884. ifile.open("lib.dat",ios::in|ios::binary);
  885. ifile.read((char*)&b1,sizeof(b1));
  886. if(ubcode==b1.getbcode())
  887. {
  888. b1.putdata();
  889. getch();
  890. }
  891. else
  892. cout<<"!!ERROR!!"<<endl;
  893. getch();
  894. mainmenu();
  895. }
  896. }
  897. else
  898. cout<<"WRONG LIBRARY ID PLZ TRY AGAIN"<<endl;
  899. getch();
  900. mainmenu();
  901. }
  902. iofile.close();
  903. }
  904.  
  905.  
  906.  
  907. void dispalluser(void)
  908. {
  909. ifstream fio("user.dat",ios::in|ios::binary);
  910. fio.seekg(0,ios::beg);
  911. cout<<" the file contains"<<endl;
  912. while(!fio.eof())
  913. {
  914. fio.read((char*)&s1,sizeof(s1));
  915. if(fio.eof())
  916. {
  917. break;
  918. }
  919. else
  920. s1.display();
  921. getch();
  922. }
  923. fio.close();
  924. }
  925.  
  926.  
  927.  
  928. void mainmenu(void)
  929. {
  930. int m,n,mn,ch;
  931. int ans;
  932. int gdriver = EGA, gmode = EGAHI;
  933. int bkcol, maxcolor,color;
  934. char msg[80];
  935. initgraph(&gdriver, &gmode,"");
  936. maxcolor = getmaxcolor();
  937. bkcol=maxcolor=4;
  938. setbkcolor(bkcol);
  939. color=maxcolor;
  940. setcolor(color);
  941.  
  942. gotoxy(25,5);
  943. cout<<"M A I N M E N U";
  944. gotoxy(17,10);
  945. cout<<"1. BOOKS MENU";
  946. gotoxy(17,12);
  947. cout<<"2. ACCOUNT MENU";
  948. gotoxy(17,14);
  949. cout<<"3. USER MENU";
  950. gotoxy(17,16);
  951. cout<<"4. EXIT";
  952. gotoxy(40,24);
  953. cout<<"Enter Option(1-4):";
  954.  
  955. cin>>m;
  956.  
  957. switch(m)
  958. {
  959.  
  960. case 1:
  961. {
  962. int gdriver = EGA, gmode = EGAHI;
  963. int bkcol, maxcolor,color;
  964. initgraph(&gdriver, &gmode,"");
  965. maxcolor = getmaxcolor();
  966. bkcol=maxcolor=2;
  967. setbkcolor(bkcol);
  968. color=maxcolor;
  969. setcolor(color);
  970. gotoxy(20,4);
  971. cout<<" 1 : ADD A BOOK";
  972. gotoxy(20,6);
  973. cout<<" 2 : SEARCH A BOOK";
  974. gotoxy(20,8);
  975. cout<<" 3 : MODIFY A BOOK'S RECORD";
  976. gotoxy(20,10);
  977. cout<<" 4 : DELETE";
  978. gotoxy(20,12);
  979. cout<<" 5 : DISPLAY ALL ";
  980. gotoxy(20,14);
  981. cout<<" 6 : RETURN TO MAIN MENU"<<endl;
  982. gotoxy(20,16);
  983. cout<<"ENTER OPTION(1-7)"<<endl;
  984. cin>>n;
  985.  
  986. switch(n)
  987. {
  988. case 1:
  989. {
  990. addbook();
  991. break;
  992. }
  993. case 2:
  994. {
  995. searchbook();
  996. break;
  997. }
  998. case 3:
  999. {
  1000. modifybook();
  1001. break;
  1002. }
  1003. case 4:
  1004. {
  1005. deletebook();
  1006. break;
  1007. }
  1008. case 5:
  1009. {
  1010. dispallbook();
  1011. break;
  1012. }
  1013. case 6:
  1014. {
  1015. mainmenu();
  1016. }
  1017. default: cout<<"INVALID ENTRY!!"<<endl;
  1018. }
  1019. break;
  1020. }
  1021.  
  1022. case 2:
  1023. {
  1024. int gdriver = EGA, gmode = EGAHI;
  1025. int bkcol, maxcolor,color;
  1026. initgraph(&gdriver, &gmode,"");
  1027. maxcolor = getmaxcolor();
  1028. bkcol=maxcolor=11;
  1029. setbkcolor(bkcol);
  1030. color=maxcolor;
  1031. setcolor(color);
  1032. cout<<"1 : CREATE NEW ACCOUNT"<<endl;
  1033. cout<<"2 : SEARCH A USER"<<endl;
  1034. cout<<"3 : MODIFY A USER'S INFO"<<endl;
  1035. cout<<"4 : DELETE A USER"<<endl;
  1036. cout<<"5 : DISPLAY ALL USERS"<<endl;
  1037. cout<<"6 : RETURN TO MAIN MENU"<<endl;
  1038. cout<<"ENTER OPTION(1-6)"<<endl;
  1039. cin>>mn;
  1040.  
  1041. switch(mn)
  1042. {
  1043.  
  1044. case 1:
  1045. {
  1046. adduser();
  1047. break;
  1048. }
  1049. case 2:
  1050. {
  1051. searchuser();
  1052. break;
  1053. }
  1054. case 3:
  1055. {
  1056. modifyaccount();
  1057. break;
  1058. }
  1059. case 4:
  1060. {
  1061. deleteuser();
  1062. break;
  1063. }
  1064. case 5:
  1065. {
  1066. dispalluser();
  1067. break;
  1068. }
  1069. case 6:
  1070. {
  1071. mainmenu();
  1072. }
  1073. default : cout<<"INVALID ENTRY!!"<<endl;
  1074. }
  1075. break;
  1076. }
  1077.  
  1078. case 3:
  1079. {
  1080. int gdriver = EGA, gmode = EGAHI, errorcode;
  1081. int bkcol, maxcolor,color;
  1082. initgraph(&gdriver, &gmode,"");
  1083. maxcolor = getmaxcolor();
  1084. bkcol=maxcolor=9;
  1085. setbkcolor(bkcol);
  1086. color=maxcolor;
  1087. setcolor(color);
  1088. cout<<"welcome to user's manual"<<endl;
  1089. cout<<"1: ISSUE BOOK"<<endl;
  1090. cout<<"2: RETURN BOOK"<<endl;
  1091. cout<<"3: CURRENT RECORD"<<endl;
  1092. cout<<"4:RETURN TO MAIN MENU"<<endl;
  1093. cout<<"ENTER OPTION(1-4)"<<endl;
  1094. cin>>ch;
  1095. switch(ch)
  1096. {
  1097. case 1:
  1098. {
  1099. issuebook();
  1100. break;
  1101. }
  1102. case 2:
  1103. {
  1104. returnbook();
  1105. break;
  1106. }
  1107. case 3:
  1108. {
  1109. record();
  1110. break;
  1111. }
  1112. case 4:
  1113. {
  1114. mainmenu();
  1115. }
  1116. default: cout<<"INVALID ENTRY!!"<<endl;
  1117. }
  1118. break;
  1119. }
  1120.  
  1121. case 4:
  1122. {
  1123. cout<<"press any key to continue"<<endl;
  1124. exit(0);
  1125. break;
  1126. }
  1127. default:cout<<"INVALID ENTRY!!"<<endl;
  1128. }
  1129. }
  1130.  
  1131.  
  1132.  
  1133. void main()
  1134. {
  1135. clrscr();
  1136. mainmenu();
  1137. getch();
  1138. }
Last edited by Ancient Dragon; Jan 25th, 2009 at 7:40 am. Reason: add code tags
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1,735
Reputation: Lerner is a name known to all Lerner is a name known to all Lerner is a name known to all Lerner is a name known to all Lerner is a name known to all Lerner is a name known to all 
Solved Threads: 281
Lerner Lerner is online now Online
Posting Virtuoso

Re: need help in lib management project

 
0
  #2
Jan 24th, 2009
Well, I don't see a function called issue(). I do see a function called issuebook(). Is that the one you are refering to?

While waiting for reply I offer the following in terms of general recommendations.

1) Don't use void as the return type of main(), even if your compiler let's you. It's not standard and it's one more keystroke than typing int.

2) Don't use the return value of eof() as the controlling value of a loop. Sooner or later it is going to create problems, such as looping through a sequence of code one too many times which may cause duplication of the last set of valid input and may overwrite an array, etc.

3) you have declared two mainmenu() functions. Erase the first one at the top of the code as it does nothing.

4) hopefully you indent your code when writing it (if not, do so!) and the indentation was lost when you posted it here because of the way the board works. To prevent that from happening in the future read about using code tags around the code posted to maintain the indentation, etc. Information about using code tags is in the watermark before you start typing into the Message box, and even better, in one of the announcements at the top of this board.
Many people here won't read code if not indented, especially if it's long, because it's just too hard to do comfortably.

4) Try to be more specific when asking questions---what isn't working right about the function? And try to be more specific about the code you post. Hopefully if you ask a specific enough question you can post just the function in question and not the whole program. If additional code is requested by a respondent, then you can post it.

5) Comment your code. It will help you decode it and it will help people reading your code figure out what you are actually trying to do instead of trying to make a guess.
Klatu Barada Nikto
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 621
Reputation: Murtan is a jewel in the rough Murtan is a jewel in the rough Murtan is a jewel in the rough Murtan is a jewel in the rough 
Solved Threads: 101
Murtan Murtan is offline Offline
Practically a Master Poster

Re: need help in lib management project

 
0
  #3
Jan 24th, 2009
I agree with all of Lerner's comments.

I decided your problem looked like fun so I decided to try and get it to compile on my system.

What Compiler are you using?

What is your target Operating System?

(My compiler didn't have support for the BGI graphics so I had to comment it all out -- and fix several other things that relied on it working.)

First major oops is that you keep calling mainmenu() to return to the main menu. That does NOT return to the main menu, it calls a brand new mainmenu that in theory would return to where you called it from, but your mainmenu() as coded will never return.

Every time you make a menu selection and return to the main menu your stack gets a little smaller, eventually (if you ran the program long enough) you would run out and the program will fault.

I'll keep converting and trying to get it to compile / run. But a good specific question would be very helpful. (Something like "When I select ___ from the ___ menu, I expected to see ___ but I see ___ instead. What did I miss?" gives good location and information.) The better the information you give the more likely you are to get a useful answer.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 4
Reputation: maddy05 is an unknown quantity at this point 
Solved Threads: 0
maddy05 maddy05 is offline Offline
Newbie Poster

Re: need help in lib management project

 
0
  #4
Jan 25th, 2009
ok this is actually my 1st c++ prog.This is the issuebook function some how i have corrected the first mistake.
IT takes an user id reads the user file and check if the status( a data member ) is 1 or not if 1 it allow u to issue a book. then the function search book search the books and return its code to bbcode if search is unsuccessful than 0 is returned now after the book is issued the value of issue of book becomes 2 and value of status of user becomes 2.

now the value of issue is showing to be 2 but not that of status of user it is still showing 1.



  1. void issuebook(void)
  2. {
  3. char ch;
  4. int m,n,uid;
  5. int rec1=0,rec2=0;
  6. libdate temp;
  7. cout<<"Enter ur library ID"<<endl;
  8. cin>>uid;
  9. fstream iofile("user.dat",ios::in|ios::out|ios::binary);
  10. fstream ifile("lib.dat",ios::in|ios::out|ios::binary);
  11. while(!iofile.eof())
  12. {
  13. long pos=iofile.tellg();
  14. iofile.read((char*)&s1,sizeof(s1));
  15. rec1++;
  16. if(uid==s1.getid())
  17. {
  18. n=s1.getstatus();
  19. if(n==2)
  20. {
  21. cout<<"you already have issued one book"<<endl;
  22. getch();
  23. mainmenu();
  24. }
  25. else
  26. cout<<".....Search the book you want to issue"<<endl;
  27. getch();
  28. int bbcode = searchbook();
  29. while(bbcode!=0)
  30. {
  31. cout<<"are u sure u want to take this book(y/n)"<<endl;
  32. cin>>ch;
  33. if(ch=='y'||ch=='Y')
  34. {
  35. while(!ifile.eof())
  36. {
  37. ifile.read((char*)&b1,sizeof(b1));
  38. rec2++;
  39. if(bbcode==b1.getbcode())
  40. {
  41. m=b1.getissue();
  42. if(m==2)
  43. {
  44. cout<<"Already issued...\n";
  45. mainmenu();
  46. }
  47. else
  48. s1.bid=bbcode;
  49. b1.cissuen();
  50. s1.cstatusn();
  51. cout<<"enter date of issue"<<endl;
  52. {
  53. cout<<"enter day"<<endl;
  54. cin>>temp.day;
  55. cout<<"enter month"<<endl;
  56. cin>>temp.month;
  57. cout<<"enter year"<<endl;
  58. cin>>temp.year;
  59. }
  60. s1.doi=temp;
  61. cout<<"updating users record"<<endl;
  62. iofile.seekg(pos);
  63. iofile.write((char*)&s1,sizeof(s1));
  64. cout<<"updating books record"<<endl;
  65. ifile.seekg((rec2-1)*sizeof(b1),ios::beg);
  66. ifile.write((char*)&b1,sizeof(book));
  67. cout<<" Status updated..\n";
  68. getch();
  69. }
  70. }
  71. ifile.close();
  72. mainmenu();
  73. }
  74. else
  75. {
  76. cout<<"SORRY u can search some other time"<<endl;
  77. ifile.close();
  78. iofile.close();
  79. getch();
  80. mainmenu();
  81. }
  82. }
  83. }
  84. else
  85. cout<<"WRONG ID ENTERED!!!..PLZ ENTER YOUR VALID ID"<<endl;
  86. iofile.close();
  87. getch();
  88. mainmenu();
  89. }
  90. iofile.close();
  91. }
Last edited by Ancient Dragon; Jan 25th, 2009 at 7:39 am. Reason: add code tags
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 621
Reputation: Murtan is a jewel in the rough Murtan is a jewel in the rough Murtan is a jewel in the rough Murtan is a jewel in the rough 
Solved Threads: 101
Murtan Murtan is offline Offline
Practically a Master Poster

Re: need help in lib management project

 
0
  #5
Jan 25th, 2009
Did you see the note about code tags?

When posting c++ code, please use c++ code tags
[code=c++]
// Your code here
[/code]
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 621
Reputation: Murtan is a jewel in the rough Murtan is a jewel in the rough Murtan is a jewel in the rough Murtan is a jewel in the rough 
Solved Threads: 101
Murtan Murtan is offline Offline
Practically a Master Poster

Re: need help in lib management project

 
0
  #6
Jan 25th, 2009
You're not using the same style of seek for both files.
  1. iofile.seekg(pos);
  2. ifile.seekg((rec2-1)*sizeof(b1),ios::beg);


The user file never gets closed.
  1. ifile.close();
  2. mainmenu();


You're still calling for a new mainmenu().

You didn't answer the Compiler and O/S questions.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 123
Reputation: shasha821110 is an unknown quantity at this point 
Solved Threads: 2
shasha821110 shasha821110 is offline Offline
Junior Poster

Re: need help in lib management project

 
0
  #7
Jan 25th, 2009
read your code and have some personal suggestions about that:
is it better to have different classes like
class libmembers 
{
}

class libusers
{
}

class book
{
}

??
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 4
Reputation: maddy05 is an unknown quantity at this point 
Solved Threads: 0
maddy05 maddy05 is offline Offline
Newbie Poster

Re: need help in lib management project

 
0
  #8
Jan 26th, 2009


#
fstream iofile("user.dat",ios::in|ios::out|ios::binary);
#
fstream ifile("lib.dat",ios::in|ios::out|ios::binary);
see i m using the same way to open two files

#
cout<<"updating users record"<<endl;
#
iofile.seekg(pos);
#
iofile.write((char*)&s1,sizeof(s1));
#
cout<<"updating books record"<<endl;
#
ifile.seekg((rec2-1)*sizeof(b1),ios::beg);
#
ifile.write((char*)&b1,sizeof(book));
and the same way to write into files that is the pos will tell the address before reading the record and rec2 just increments value after reading each record so each time i sets the put pointer at the beginning of record.
But whenever i run the prog the book file is working correctly and the value of issue in book is changing to 2 but it is not writing anything in user record.
i then closed the iofile and opened a new file wofile in output mode only so it just erased all the previos record so if i just use it for 1 user the program is correct but for multiple user it is not.

and murtan i have to pasted some special files named bgifiles in the include folder ( i had taken them from school u can search net ) to enable graphics
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 621
Reputation: Murtan is a jewel in the rough Murtan is a jewel in the rough Murtan is a jewel in the rough Murtan is a jewel in the rough 
Solved Threads: 101
Murtan Murtan is offline Offline
Practically a Master Poster

Re: need help in lib management project

 
0
  #9
Jan 26th, 2009
You may have BGI files, but I didn't and so I had to modify the code to get it to compile. I'm running Windows, and as I understand it, BGI is not compatible.

Maybe if I make the questions BIG you'll answer them:

WHAT COMPILER ARE YOU USING?

WHAT OPERATING SYSTEM ARE YOU RUNNING ON?

The point I was making about the seeks, was that one is using ios::beg and the other wasn't, it may be the default, but you made a point of passing it to one and not to the other.

Why use tellg to get position for one file and use a record counter and a mulitply for the other file? Why not use the same method for both files?

(I'm picking at differences between the two because you say one works and the other doesn't.)

If I've been reading through the code correctly, it is designed to loan (issue) one book (that has not already been issued) to the member (that does not already have a book). Is there any sense or record of which member has which book?

Would it ever be desired to issue more than one book to a member? (I know my local library will )

This application seems like it would lend itself well to a database, might that be an option for ongoing development?

I took your last issue book posted and I'm trying to work with it, but the BGI conversion and the getch() conversions as well as re-writing to not call mainmenu() again are painful.

If you want to modify your program so that mainmenu is a loop, you could use the following as a basis if you like. If you insist on calling mainmenu() from wherever you feel like in your code, I think I'm done trying to take your 'new' code to put in my test application.

My version of your main menu (its not as pretty, but it compiles and runs.)
  1. void mainmenu()
  2. {
  3. int m;
  4. //int gdriver = EGA, gmode = EGAHI;
  5. //int bkcol, maxcolor,color;
  6. //char msg[80];
  7. //initgraph(&gdriver, &gmode,"");
  8. //maxcolor = getmaxcolor();
  9. //bkcol=maxcolor=4;
  10. //setbkcolor(bkcol);
  11. //color=maxcolor;
  12. //setcolor(color);
  13.  
  14. m = 0;
  15. while (m != 4)
  16. {
  17.  
  18. //gotoxy(25,5);
  19. cout << "\n\nM A I N M E N U\n";
  20. //gotoxy(17,10);
  21. cout<<"1. BOOKS MENU\n";
  22. //gotoxy(17,12);
  23. cout<<"2. ACCOUNT MENU\n";
  24. //gotoxy(17,14);
  25. cout<<"3. USER MENU\n";
  26. //gotoxy(17,16);
  27. cout<<"4. EXIT\n";
  28. //gotoxy(40,24);
  29. m = inputInt("Enter Option(1-4): ", 1, 4);
  30.  
  31. switch(m)
  32. {
  33. case 1:
  34. booksmenu();
  35. break;
  36. case 2:
  37. accountmenu();
  38. break;
  39. case 3:
  40. usermenu();
  41. break;
  42. case 4:
  43. break;
  44. default:
  45. cout << m << " is not a valid option" << endl;
  46. }
  47. }
  48. }

inputInt is a helper function I wrote, I'm not entirely happy with it, but I was having problems with input stream status so I made a few functions to help me out:
  1. // Prompt for and accept an integer value. Enforce the specified range on the input
  2. int inputInt(char const * prompt, int minval, int maxval)
  3. {
  4. int rval = -1;
  5. std::string tmp;
  6.  
  7. for (;;)
  8. {
  9. std::cout << prompt;
  10. getline(std::cin, tmp);
  11. rval = atol(tmp.c_str());
  12. if (rval < minval)
  13. {
  14. std::cout << rval << "is below the minimum (" << minval << ")" << std::endl;
  15. }
  16. else if (rval > maxval)
  17. {
  18. std::cout << rval << "is above the maximum (" << maxval << ")" << std::endl;
  19. }
  20. else
  21. {
  22. break;
  23. }
  24. }
  25. return rval;
  26. }
(This code is from another .cpp file that does not have a using namespace std; )
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 4
Reputation: maddy05 is an unknown quantity at this point 
Solved Threads: 0
maddy05 maddy05 is offline Offline
Newbie Poster

Re: need help in lib management project

 
0
  #10
Jan 26th, 2009
well the pos will tell the address of pointer before reading so setting it their and increming in rec++ is just diff method but both fetch same results i used this pos to print the value as i was checking whether it is working right or not so i just printed cout<<pos and then printed cout<<(rec1-1)*sizeof(s1) so both gives same value.


i have just modified the code as opening the iofile in ifstream then close it and open a new file wwfile in output mode so it just erases all the record barring the one using it
but it will work coz atleast i can show the examiner that my program is working
i m using window xp i m not getting what do u mean by compiter but i m using turbo c++ version 3.0

this is the boundation of program user can issue only 1 book at a time.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC