Can I ask for a bit more information, please? What sort of program? Any program can run in the background.
For example, if you start downloading a file using your web browser, and then open Gimp to do some drawing, then while you are drawing the Web browser is working in the background. Just by the fact that your browser is still open while you are drawing, it is still working in the background.
If you have an Antivirus, such as Clam, that will be continuously working in the background. While you are using your computer there are many programs working in the background.
I'm sorry for not being able to understand your question.
Linux is an Operating System, and I can appreciate that you want to write a program that will work with the Linux Operating System, but what languages can you write in, C++? What sort of program, specifically, do you want to write?
If you are asking for a means for surveillance, spying on the use of a computer running Linux, then I can't say what help you would be given without very extensive information.
You can tell us wich program want to run in background? you can see the man pages, an example of real background running program is "wget -c -t 00 -b "url" path/to/save/files" when -b is background, so please give us some more info thanks.