When you convert the code into C you can use structs to use the class design by defining a struct with all class member and redesign the called functions with an additional first parameter of the pointer to the struct. This avoids copying the data.
Read this
struct tutorial and remember to work with pointes.