I have a query, I have a set of flat files (say file1, file2, etc.) containing column names and native data types. (how values ββare stored and can be read in C ++ is elementary) for example. a file with a flat file1 can have data such as col1_name = id, col1_type = integer, col2_name = name, col2_type = string, etc.
Therefore, for each flat file I need to create a C ++ data structure (i.e. 1 data structure with flat files = 1), where the name of the member variable matches the name of the column, and its data type will have its own C ++ data type such as int, float, string, etc. depending on the type of column in the flat file. above, for example: my flat file 1 should give me below ads
class file1{ int id; string Name; };
Is there a way to write C ++ code where the generated binary will read a flat file and create a data structure based on the file (the class name will be the same as the file name with a flat file). All classes created using these flat files will share the functionality of the getter and setter member functions.
Let me know if you have done something similar before or have any idea about it.
user1138939
source share