i wish to configure httpd.conf file by using c++

i wish to create a small project to configure http server by using GUI programming for this reason i want to configure httpd.conf file through coding and how i can run command like

#service httpd restart
#chkconfig httpd on


if you know please help me