title: How to get pointer to buffer to read the contents and check the remaining data
body: <p>I am doing an application in c++ in which i need to use pointer to read the contents of the buffer. I used the following code to declare pointer to the buffer.</p>
  
  <p>unsigned char *ptrToBuf = gchOBDReplyBuf;</p>
  
  <p>The buffer has the data from a text file in it.
  My question is how can i read the contents of this buffer using pointers? Also each time i need to check the buffer remaining contents as I need to exit when the buffer data have been fully read.Please help as I am not familiar with the contents of pointers..</p>
  
  <p>Thanks in Advance</p>