On 30 Apr 2004 09:07:39 -0700,
gomerpyl3@aol.com (gomerpyl3) wrote:
[color=blue]
>I am trying to make a small system to record details for a small video
>/ DVD shop - approx 200 members @ the mo
>
>I wanted it to be able to do the following:
>
>Check out a video / DVD
>Return video / DVD
>Add a new Video / DVD to stock
>Remove a Video / DVD from stock
>Display all Video / DVD in stock
>Display member details
>[/color]
Very incomplete. Remember the acronym CRUD: Create, Read, Update,
Destroy. Apply this to your two data types: Video/DVD and Member.
[color=blue]
>
>I've made the Menu, but I am stumped as to how I can go about the rest
>of the programmes & link them to the menu.[/color]
Write a series of separate functions: check_out_video(/***/),
return_video(/***/) etc. Make these functions public member functions
of the appropriate class. Call them from your menu routine.
[color=blue]
>
>Storage of the details would be in a number of *.dat files
>(hopefully).[/color]
You will need some write() functions and some read() functions for
this. Again make them public member functions of the appropriate
class.
[color=blue]
>
>A the code for the menu is available @
>
>
http://hometown.aol.com/gomerpyl3/myhomepage/index.html[/color]
If your code is worth reading then it is worth cutting and pasting it
into your post here.
[color=blue]
>#include <iostream.h>[/color]
This is deprecated, use <iostream> (no ".h")
[color=blue]
>void main(void)[/color]
main *always* returns int. Your compiler should have rejected this.
(void) is unneccessary and often considered bad style.
Change to "int main()"
You should have spaces round operators for a better layout. An
ability to indent HTML, or a quick google for a code to HTML utility
would help.
rossum
[color=blue]
>
>Any help is gratefully recieved.
>
>John[/color]
--
The Ultimate Truth is that there is no Ultimate Truth