When you say:
Jstack < int > myStack();
it actually is a prototype declaration of a function called "mystack" which returns a "Jstack<int>" and takes no arguments. It is not a variable declaration at all...
I notice couple of problems here:
1. Your destructor is defined like this:
~Jstack() {void};
change it to
~Jstack() {};
2. Your instantiation of the template looks wrong.
Jstack < int > myStack();
Try changing it to:
Jstack < int > myStack;
Hope this helps.
You cannot access a protected member of a class except from a derived class. Since you are trying to access it from outside the Video class which is not derived from the Video class, what you need here is an setter function that would set the info member of the video class.
Something like...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.