How to run a lxc container using C API for which we only have rootfs and self created config file?

Please help! I am new to containers, so I have been getting few errors. Please guide me with the code.