How do you write a C++ program for burning cd
Why would you want to reinvent the wheel?
You should check out the Optical Storage Techincal Discussions area and this sticky post:
Of course, you will need to know how to read and write code. Truman has some excellent examples there.