I want to know how can I create a program that is launched automatically after each killing?
I mean when you kill anti-virus process in Task Manager, it is launched automatically again.
How can I create a program like as anti-virus in C++ or Qt in windows platform?
Write a Qt program that uses QProcess to launch a second program. (If you want to be clever, you can have the Qt program launch itself with a special argv-argument to let the child process know that it should be playing the role of the second program, rather than the launcher program)
Back in the parent process, be sure to connect the QProcess object's finished(int,QProcess::ExitStatus) signal to a slot, so that you can be notified whenever the child process exits (or is killed). Your slot can then create a new QProcess object and launch a new child process. (It might be wise to put in a one-second delay though, in case the child process starts exiting immediately on startup for some reason -- that way you won't spin the CPU with continuous deaths-and-relaunchings)