i have an base class like this
class Base
{
public:
virtual void fun() const =0;
};
Derived class like this :
class Derived:public Base
{
virtual void fun()
{
}
};
I had an global structure
struct Mystruct
{
int a;
char *b;
}MYSTRUCT;
I added the structure in list stl as
std::list< MYSTRUCT* > SS1;
List = new MYSTRUCT;
vector<MYSTRUCT*>SS;
SS.push_back( List);
Now can i pass the this stl list to the fun function and access the struct in the function?