i m developing a movie rental shop project where i have a class as name as Movie.

in public there are sum functions like add movie,view movie list etc.
the problem is that i don,t know what would b in private access.

in movie i have the tital of movie, director of movie, date of release and actors of movie

plz help me what would b in private access.

The default should be
- all member functions are public
- all member data is private

If you end up with public data, you're definitely doing something wrong.

There's also protected, but I don't think you'll need that for this exercise, especially if it hasn't been mentioned in class yet.

The default should be
- all member functions are public
- all member data is private

If you end up with public data, you're definitely doing something wrong.

There's also protected, but I don't think you'll need that for this exercise, especially if it hasn't been mentioned in class yet.

well i have declared the data members as they are mentioned below.

private:

string Tital;
string Director;
string Actors;
int year;

i have include string.h in terbo c compiler bur there are errors.

nd secondly in constructor what should i initialize????

Great, another "Turbo C" user.

It's older than you are.

I dunno, it's like trying to teach "Modern English Usage" to Shakespeare.

Verily, twas the nyte befor the fulle moone....

Perhaps you should ask your tutor why they're STILL teaching using a compiler which was rendered obsolete 20 years ago, for an operating system which is similarly a relic of the past.
Then ask them HOW that can possibly prepare you for a programming life after you leave college.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.