[comp.lang.c++] Beginner Q on X & C++

narain@opus.eng.buffalo.edu (Sudeep Narain) (06/16/90)

Hi,
   I am trying to use X Windows from a C++ program & I get these two 
compiler errors :

: error: no standard conversion of  XEvent * to  XMappingEvent *
: error: no standard conversion of  XEvent * to  XKeyEvent *

The lines of code which it refers to is :


	 case MappingNotify:   /* process keyboard mapping changes */
---->			XRefreshKeyboardMapping(&myevent);
			break;
	 case KeyPress:        /* process keyboard input */
---->			i = XLookupString(&myevent, text, 10,&mykey, 0);
			if(i == 1 && text[0] == 'q') watch = 1;
			break;

"myevent" is defined as of type XEvent.

Wont including Xlib.h & Xutil.h take care of these castings ?

This is my first attempt with X and C++. Any pointers will be 
greatly appreciated. Please E-mail your responses to :

narain@acsu.buffalo.edu

thanks,
Sudeep