473,779 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

library system

20 New Member
I am trying to develop a small program which does library books. I have tried the code below but it still does not work. Can someone help me to debug the program and advice accordingly.


ii) // This program get or request the customer to enter their details and or details of the book.
Expand|Select|Wrap|Line Numbers
  1. # include <iostream.h>
  2. # include “Library.h”
  3. int Main ()
  4. {
  5. Void display Customer details (Char*Char[], String);
  6. Void display books details (Char*Char[], double);
  7. Void display books on loan (Char, date)
  8. Void display books due (Char, date);
  9.  
  10.  
  11.  
  12.  
  13. Void add customers, books (Char*Char[], double);
  14. Void print report details (Char, double, string);
  15. }
  16. Void Library: : display customers details ()
  17. {
  18. cout << “Enter First name” <<endl;
  19. cin >> First name;
  20. cout << “Enter Last Name” <<endl;
  21. cin >> Last name;
  22. cout << “Enter Address” <<endl;
  23. cin >> Address;
  24. cout << “Enter telephone number” <<endl;
  25. cin >> telephone number;
  26. }
  27. Void Library: : Display Book details ()
  28. {
  29. cout << “Enter Title” <<endl;
  30. cin >> Title;
  31. cout << “Enter Author” <<endl;
  32. cin >> Aithor;
  33. cout << “Enter ISDN Number” <<endl;
  34. cin >> ISDN Number;
  35. cout << “Enter Number of pages” <<endl;
  36. cin >> Number of pages;
  37. }
  38. Void Library: : Display book loans ()
  39. {
  40. int on loan date;
  41. int date due returned;
  42. cout << “enter on loan date” <<endl;
  43. cin >> on loan date;
  44. cout << “Enter date due returned” <<endl;
  45. cin >> Date due returned;
  46. }
  47.  
  48. Void Library: : Add Customer, Books ()
  49. {
  50. cout << “Add First name”<<First name<< “Last name” <<Last name<< “Address” <<Address<< “telephone number” <<telephone number<<endl;
  51. cin >>First name >>last name >>Address >>Telephone number;
  52. cout << “Add Title<< Title<< “Author”<< Author<< “ISDN Number”<< ISDN Number<< “number of pages”<< Number of pages <<endl;
  53. cin >> Title>> Author>> ISDN number>> Number of pages;
  54. }
  55. Void Library: : Display customer loans ()
  56. {
  57. int on loan date;
  58. int date due returned;
  59. cout << “enter on loan date” <<endl;
  60. cin >> on loan date;
  61. cout <<”Enter date due returned” <<endl;
  62. cin >> Date due returned;
  63. }
  64. Void Library: : Print detail report ()
  65. cout << “The details of each customer with loan books is”<<customer<<endl;
  66. cout<< “The detail of each book on loan is”<<book<<endl;
  67. cout << “The detail of loan is” <<loan<<endl;
  68.                 or
  69. }
  70. Void Library: : print detail report()
  71. cout << “customer”<< “book”<< “loan”<<endl;
  72. cin >> customer>>book>>loan>>endl;
  73. }
  74. Return 0;
  75.  
  76.  
  77.  
  78.  
  79. iii)    Class Customer
  80. {
  81. Public: :        // Modifiers
  82.     Customer (); // default constructor
  83. Void display customer details (Char*Char [], String);
  84. Private: :        // Queries
  85.     Char First name [20], Last name[25];
  86.     Char Address;
  87.     String Telephone number;
  88. };
  89.  
  90.  
  91.  
  92.  
  93.  
  94. iv)    Class Library
  95. {
  96. Public : 
  97.         Library ();
  98.         Void display total records of books (Char, double);
  99.  
  100. Private:
  101.         Char Title, Author;
  102.         Double ISDN number, Number of pages
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116. v)    Void Library: : Add Customer, Books ()
  117. {
  118. cout << “Add Title<< UML Distilled<< “Author”<< Martin Fowler<< “ISDN Number”<< ISDN [0-201-32563]<< “number of pages”<< 170 pages <<endl;
  119. cin >> UML Distilled >> Martin Fowler >> ISDN [0-201-32563]>> 170 pages;
  120. };
  121. cout << “Add Title<< C++ Primer<< “Author”<< Stanley B Lippman<< “ISDN Number”<< ISDN[0-201-16487-6]<< “number of pages”<< 540 pages <<endl;
  122. cin >> C++ Primer >> Stanley B Lippman>>ISDN[0-201-16487-6]>> 540 pages;
  123. }
  124. Return 0;
  125.  
  126. Void Library: : Add Customer, Books ()
  127. {
  128. cout << “Add First name”<<Joe<< “Last name”<<Bloggs<< “Address” <<123 Kloof Street cape town<< “telephone number” <<4611111<<endl;
  129. cin >> Joe>> Bloggs>>123 Kloof Street Cape Town>> 4611111;
  130. };
  131. cout << “Add First name”<<John<< “Last name”<<Smith<< “Address” <<111 Lansdowne Road Claremont<< “telephone number” <<6711111<<endl;
  132. cin >> John>> Smith>>111 Lansdowne Road Claremont>> 6711111;
  133. }
  134. Return 0;
  135.  
  136.  
  137.  
  138.  
  139. Void Library: : Display customer loans ()
  140. {
  141. cin >> Joe>> Bloggs>>123 Kloof Street Cape Town>> 4611111;
  142. };
  143. cin >> C++ Primer >> Stanley B Lippman>>ISDN[0-201-16487-6]>> 540 pages;
  144. };
  145. int on loan date;
  146. int date due returned;
  147. cout << “2004/05/10” <<endl;
  148. cin >> 2004/05/10;
  149. cout <<”2004/05/20” <<endl;
  150. cin >> 2004/05/20;
  151. }
  152. Return 0;
  153.  
  154. Void Library: : Display customer loans ()
  155. {    
  156. cin >> John>> Smith>>111 Lansdowne Road Claremont>> 6711111;
  157. };
  158. cin >> UML Distilled >> Martin Fowler>>ISDN[0-201-32563]>> 170 pages;
  159. };
  160. int on loan date;
  161. int date due returned;
  162. cout << “2004/08/28” <<endl;
  163. cin >> 2004/08/28;
  164. cout <<”2004/09/07” <<endl;
  165. cin >> 2004/09/07;
  166. }
  167. Return 0;
  168.  
  169.  
  170.  
  171.  
  172. Void Library: : Print detail report()
  173. cout <<“loans”<<endl;
  174. cin >> loans>>endl;
  175. }
  176. Return 0;
Feb 12 '07 #1
3 2080
Ganon11
3,652 Recognized Expert Specialist
What compiler are you using?
Feb 12 '07 #2
r035198x
13,262 MVP
I am trying to develop a small program which does library books. I have tried the code below but it still does not work. Can someone help me to debug the program and advice accordingly.


ii) // This program get or request the customer to enter their details and or details of the book.
Expand|Select|Wrap|Line Numbers
  1. # include <iostream.h>
  2. # include “Library.h”
  3. int Main ()
  4. {
  5. Void display Customer details (Char*Char[], String);
  6. Void display books details (Char*Char[], double);
  7. Void display books on loan (Char, date)
  8. Void display books due (Char, date);
  9.  
  10.  
  11.  
  12.  
  13. Void add customers, books (Char*Char[], double);
  14. Void print report details (Char, double, string);
  15. }
  16. Void Library: : display customers details ()
  17. {
  18. cout << “Enter First name” <<endl;
  19. cin >> First name;
  20. cout << “Enter Last Name” <<endl;
  21. cin >> Last name;
  22. cout << “Enter Address” <<endl;
  23. cin >> Address;
  24. cout << “Enter telephone number” <<endl;
  25. cin >> telephone number;
  26. }
  27. Void Library: : Display Book details ()
  28. {
  29. cout << “Enter Title” <<endl;
  30. cin >> Title;
  31. cout << “Enter Author” <<endl;
  32. cin >> Aithor;
  33. cout << “Enter ISDN Number” <<endl;
  34. cin >> ISDN Number;
  35. cout << “Enter Number of pages” <<endl;
  36. cin >> Number of pages;
  37. }
  38. Void Library: : Display book loans ()
  39. {
  40. int on loan date;
  41. int date due returned;
  42. cout << “enter on loan date” <<endl;
  43. cin >> on loan date;
  44. cout << “Enter date due returned” <<endl;
  45. cin >> Date due returned;
  46. }
  47.  
  48. Void Library: : Add Customer, Books ()
  49. {
  50. cout << “Add First name”<<First name<< “Last name” <<Last name<< “Address” <<Address<< “telephone number” <<telephone number<<endl;
  51. cin >>First name >>last name >>Address >>Telephone number;
  52. cout << “Add Title<< Title<< “Author”<< Author<< “ISDN Number”<< ISDN Number<< “number of pages”<< Number of pages <<endl;
  53. cin >> Title>> Author>> ISDN number>> Number of pages;
  54. }
  55. Void Library: : Display customer loans ()
  56. {
  57. int on loan date;
  58. int date due returned;
  59. cout << “enter on loan date” <<endl;
  60. cin >> on loan date;
  61. cout <<”Enter date due returned” <<endl;
  62. cin >> Date due returned;
  63. }
  64. Void Library: : Print detail report ()
  65. cout << “The details of each customer with loan books is”<<customer<<endl;
  66. cout<< “The detail of each book on loan is”<<book<<endl;
  67. cout << “The detail of loan is” <<loan<<endl;
  68.                 or
  69. }
  70. Void Library: : print detail report()
  71. cout << “customer”<< “book”<< “loan”<<endl;
  72. cin >> customer>>book>>loan>>endl;
  73. }
  74. Return 0;
  75.  
  76.  
  77.  
  78.  
  79. iii)    Class Customer
  80. {
  81. Public: :        // Modifiers
  82.     Customer (); // default constructor
  83. Void display customer details (Char*Char [], String);
  84. Private: :        // Queries
  85.     Char First name [20], Last name[25];
  86.     Char Address;
  87.     String Telephone number;
  88. };
  89.  
  90.  
  91.  
  92.  
  93.  
  94. iv)    Class Library
  95. {
  96. Public : 
  97.         Library ();
  98.         Void display total records of books (Char, double);
  99.  
  100. Private:
  101.         Char Title, Author;
  102.         Double ISDN number, Number of pages
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116. v)    Void Library: : Add Customer, Books ()
  117. {
  118. cout << “Add Title<< UML Distilled<< “Author”<< Martin Fowler<< “ISDN Number”<< ISDN [0-201-32563]<< “number of pages”<< 170 pages <<endl;
  119. cin >> UML Distilled >> Martin Fowler >> ISDN [0-201-32563]>> 170 pages;
  120. };
  121. cout << “Add Title<< C++ Primer<< “Author”<< Stanley B Lippman<< “ISDN Number”<< ISDN[0-201-16487-6]<< “number of pages”<< 540 pages <<endl;
  122. cin >> C++ Primer >> Stanley B Lippman>>ISDN[0-201-16487-6]>> 540 pages;
  123. }
  124. Return 0;
  125.  
  126. Void Library: : Add Customer, Books ()
  127. {
  128. cout << “Add First name”<<Joe<< “Last name”<<Bloggs<< “Address” <<123 Kloof Street cape town<< “telephone number” <<4611111<<endl;
  129. cin >> Joe>> Bloggs>>123 Kloof Street Cape Town>> 4611111;
  130. };
  131. cout << “Add First name”<<John<< “Last name”<<Smith<< “Address” <<111 Lansdowne Road Claremont<< “telephone number” <<6711111<<endl;
  132. cin >> John>> Smith>>111 Lansdowne Road Claremont>> 6711111;
  133. }
  134. Return 0;
  135.  
  136.  
  137.  
  138.  
  139. Void Library: : Display customer loans ()
  140. {
  141. cin >> Joe>> Bloggs>>123 Kloof Street Cape Town>> 4611111;
  142. };
  143. cin >> C++ Primer >> Stanley B Lippman>>ISDN[0-201-16487-6]>> 540 pages;
  144. };
  145. int on loan date;
  146. int date due returned;
  147. cout << “2004/05/10” <<endl;
  148. cin >> 2004/05/10;
  149. cout <<”2004/05/20” <<endl;
  150. cin >> 2004/05/20;
  151. }
  152. Return 0;
  153.  
  154. Void Library: : Display customer loans ()
  155. {    
  156. cin >> John>> Smith>>111 Lansdowne Road Claremont>> 6711111;
  157. };
  158. cin >> UML Distilled >> Martin Fowler>>ISDN[0-201-32563]>> 170 pages;
  159. };
  160. int on loan date;
  161. int date due returned;
  162. cout << “2004/08/28” <<endl;
  163. cin >> 2004/08/28;
  164. cout <<”2004/09/07” <<endl;
  165. cin >> 2004/09/07;
  166. }
  167. Return 0;
  168.  
  169.  
  170.  
  171.  
  172. Void Library: : Print detail report()
  173. cout <<“loans”<<endl;
  174. cin >> loans>>endl;
  175. }
  176. Return 0;
Ummm C++ keywords are all lower case.
Feb 12 '07 #3
Ganon11
3,652 Recognized Expert Specialist
Please don't double-post: I have deleted the newer thread. Refer to this thread for our policy on double-posting.
Feb 13 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
6181
by: Patrick | last post by:
Following earlier discussions about invoking a .NET class library via ..NET-COM Interop (using regasm /tlb) at http://groups.google.com/groups?hl=en&lr=&threadm=%23Van7eSrEHA.4004%40TK2MSFTNGP10.phx.gbl&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26selm%3D%2523Van7eSrEHA.4004%2540TK2MSFTNGP10.phx.gbl I have concluded that my .NET class library (following the suggestions. namely setting the marshall type, etc.) , I can 1) Invoke public methods...
7
2151
by: Sonny | last post by:
I need to port a library that is written entirely in C to C++. The library is supported on quite a few platforms (windows, Solaris, Linux, AIX, HP-UX, OSX, etc...) and there's quite an existing customer base that uses it. I need to maintain backwards compatibility such that existing users won't have to do anything to their existing applications other than a re-compile when they upgrade to this new version of the library. I figure that I...
4
2447
by: ±èµ¿±Õ | last post by:
Tell me why the symbol "_" use in the Library? For example, char *_itoa( int value, char *string, int radix ); But We use function "itoa(value,string,radix) "only. I want to know the specific reason .
1
7105
by: Jim | last post by:
Have fully operational software package developed on VB.NET that worked until Jan 1 2003, with early stage deployments on Oct 10, Oct 23, Nov 11, Dec 12 and Dec 30. When attempted final deployment on Jan 2, 2004 got following messages and errors... I reset everything and tried several times agian. Then erased the setup project and tried to rebuild a new one with the same errors. PLease note... ALL this this code ran perfectly five minutes...
5
6780
by: Jesper Schmidt | last post by:
When does CLR performs initialization of static variables in a class library? (1) when the class library is loaded (2) when a static variable is first referenced (3) when... It seems that (1) holds for unmanaged C++ code, but not for managed code. I have class library with both managed and unmanaged static variables that are not referenced by any part of the program. All the
4
1669
by: Dave | last post by:
hi, I wrote class library that contain a struct stX and a new class library that get the first class library as referance and implement a function foo that one of its parametrs is of type of the struct stX; I wrote an application(exe) that get the first class library as a referance and have a member of type stX and have a referance of the second class library and caled to its function foo. The problem is when i pass the exe member of...
6
2355
by: leoman730 | last post by:
This is one of the interview question this morning, hope someone can help out with this. Thanks. What is the different between System call and library call?
20
3541
by: J de Boyne Pollard | last post by:
MThe library functions which are included to allow process Mlaunch, forking, and termination, imply that it is both Mpossible and desirable for a process to fork itself. This is Ma fundamental part of the Unix thought process, but is Mnot essential for a working OS. There are no Standard C Library functions for process forking or overlaying. The fork() and execve() functions are part of the C language bindings to POSIX. They are not...
21
2459
by: omkar pangarkar | last post by:
Hi all, I have two simple hello world programs one using printf() and other using write() --prog 1-- #include<stdio.h> #include<stdlib.h> int main() { printf("Hello"); /* up to here write() isn't called, if u * give \n here then two write()s will
20
4305
by: Nickolai Leschov | last post by:
Hello all, I am programming an embedded controller that has a 'C' library for using its system functions (I/O, timers, all the specific devices). The supplied library has .LIB and .H files. How can I dynamically load a LIB file and access all its functions? Surely someone has solved similar task? My intention is to use a Forth system for programming the controller,
0
9471
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10302
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10071
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7478
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5501
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4036
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3631
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2867
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.