Created a structure of Tape that holds (stars, producer, etc...). I created a protected data member in my Video class of Tape type named "info". When implementing a member function of the Video class I'm trying to access "info" through a reference of a Video object. I keep getting this error telling me I can't access protected member of Video class. This is the segment of the code:
void setInfo(Video& obj)
{
string star, produce, direct, productCom, typeM;
cout << "Enter stars in movie: ";
getline(cin, star);
obj.info.stars = star;
I keep this error.
error C2248: 'info' : cannot access protected member declared in class 'Video' c:\eric\homework\video.h(47) : see declaration of 'info'
If someone could explain why I'm getting this error it would be greatly appreciated!!!!
void setInfo(Video& obj)
{
string star, produce, direct, productCom, typeM;
cout << "Enter stars in movie: ";
getline(cin, star);
obj.info.stars = star;
I keep this error.
error C2248: 'info' : cannot access protected member declared in class 'Video' c:\eric\homework\video.h(47) : see declaration of 'info'
If someone could explain why I'm getting this error it would be greatly appreciated!!!!