Hi Guys I am trying to create a global object instance and am currently running into a segmentation fault while accessing a member variable.
I have a capture.h file and a capture.cpp file
//In capture.h
struct ringinfo
{
// a simple struct
};
class capture_manager{public:
func1();
func2();
ringinfo ringinf ;
};
extern capture_manager* capture_man ;
//in capture.cpp
{
capture_manager* capture_man = NULL ;
// all function definitions including a default constructor that initializes the ringinf = NULL ;
}
I include the capture.h file in a different .h/.cpp file and I can use the capture_man object and all of its functions, but whenever I try to access ringinf I get a segmentation fault
Anything obvious that I am doing wrong. ??
Thanks for the help
Akshay