[prog] C++

Warren Prasad warren_pd at yahoo.com
Wed Mar 3 21:47:23 EST 2004


Hi,
you can create a class
class cdlib
{
 char artist[30];   
 char title[50];
 int yr;
 char genre[10];
 
 public:
 void getdata();
 void showdata();
 void putdata();
}
 
void cdlib :: getdata()
{
 /* get the data from the user 
    and write it down to a text file.
    use cin */
    putdata()
/* to put data into the file  
    fopen, fwrite */
}
 
getdata()
{
/* Read the data from the file 
    fopen. fread */
}
 
this will help you create the program.
    
wolf <wolf at wolfrising.net> wrote:
Hi,

I trying to work on a sample C++ question but I'm having trouble 
getting started, I was
wondering if anyone might be able to break this into pseudo code (I 
think that's
what it's called when you just write out the steps in plain english?). 
No actual
C++ code, I tend to have trouble getting started with the questions.

write a program to track a music cd library, allow the user to enter 
cds. Each item
should include the artist, album title, year and genre. All records 
should be
displayed in order by artist. Design this using a class and represent 
each cd
as an object of that class ( This is the part that is really confusing 
me). Store the
data in a text file so it can be retrieved and viewed.

Since I use OSX I was sort of following itunes as an example, I have my 
cds listed
in a database in mysql, but I don't know if you can connect to that 
with C++?

Any ideas/suggestions would be appreciated : )

as always thanks! : )

_______________________________________________
Programming mailing list
Programming at linuxchix.org
http://mailman.linuxchix.org/mailman/listinfo/programming


Warren Bhusan Prasad.
PAV Media Center Team,
Space Block,
Digital Global Soft,
Digital Park,
Electronic City,Phase II,
Hosur Road, Bangalore.

Phone (mobile) : +91 984 513 1255



























---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.


More information about the Programming mailing list