I have a class and it has a member function and i want to call that member function in a non member function.
void mouseEvent(int evt, int x, int y, int flags, void* param);
class CMainClass
{
private:
// Xcoordinate of the click event
     int Xcoordinate;
public:
// Xcoordinate get method
         int CMainClass::GetXcoordinate()
         {
          return Xcoordinate;
         }
// Xcoordinate set method
         void CMainClass::SetXcoordinate(int newVal)
         {
           CMainClass::Xcoordinate = newVal;
         }
};
void mouseEvent(int evt, int x, int y, int flags, void* param)
{
      CMainClass::SetXcoordinate(x);
}
C++ a nonstatic member reference must be relative to a specific object
 
     
    