Can you please provide me with a sample code?

I am sorry but i am new to c++ and linux and i cant understand the concept.

Many thanks