View Single Post
  #2 (permalink)  
Old January 30th, 2004, 07:43 AM
ankur_vachhani ankur_vachhani is offline
Authorized User
 
Join Date: Jan 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ankur_vachhani
Default

Quote:
quote:Originally posted by amahja56



CHANGE THE CODE AS FOLLOWS

# include <iostream.h>
# include <conio.h>

class card
{
private:
char book;
int author;
int nocopies;

public:
void store();
void show();
};

void card::store()
{
cout<<"enter book title:";
cin>>book;
cout<<" nenter the author's name:";
cin>>author;
cout<<" nenter the number of copies:";
cin>>nocopies;
}

void card::show()
{
cout<<"\nthe book title is:"<<book;
cout<<"\nthe athor's name is:"<<author;
cout<<"\nthe number od copies are:"<<nocopies;
}





int main()
{

card my_book;


my_book.store();
my_book.show();


getch();
}






Reply With Quote