I have attached my sample code for my school's KinectDevice class, written in C++, which provides a simple interface to the Kinect. You simply write
Code:
// assuming 'capture' is a KinectDevice
cv::Mat frame;
capture >> frame;
in order to read a frame from the Kinect. Hope it helps.