How to connect systemverilog file with cplusplus(.cpp) file using dpi

Can you please explain me with one little example ?
So, I can easily understand