Save to PCD File

Hello, first thing first I sorry if these are redudant question,
I try to develop astra 3d camera with astra sdk on visual studio 2013, honestly I newbie on programming c++ language,
on sample code there only show how to write result of stream data, but no sample for saving data from 3D Camera to PCD file, how can I save to PCD file?

Thank you