import poly files

Need to change codes from c to c++