can any one provied me a source code in c++ for hard disk partioioning!

and please any one tell me how to access MBR and edit it