I have a class named Coverage.It has some variables of datatype string and some functions with return type string.
This class is used in other header files.I want to convert the class into a C Structure. Other header file are using the class objects in there functions.I want to change the class in away that I don't have to make changes in other header files.
Like if the function were
string ABC(Coverage* coverage);
My structure should work as a class in behaviour; but unable to create a function in a structure as it is not recommended in C.
class Coverage
{
std::string country;
std::string KpRuntimeDir();
std::string CRtimeDir();
std::string RtimeDir();
};
Convert the class as, for instance:
struct Coverage n{
char country[];
/* [...] */
};