I have a class that has a static member struct
class SharedMem
{
public:
struct memory {
char buff[100];
int status, pid1, pid2;
};
static struct memory* shmptr;
}
I would like to define the static struct using
SharedMem::memory shmptr;
But I'm getting errors undefined reference to 'SharedMem::shmptr'
How do I properly define the struct in C++?
And follow up question, how can I define this struct if my class is entirely in the header file, can I define it after the class declaration at the bottom of the header file?
Thanks