currently I am working on a requirement in c++ where I will be reading text file which have inputs like
AB,
ABX,
ABY,
ABZ,
CD,
CDX,
CDY,
CDZ
so for above two set of inputs 'AB' & 'CD' is unique in each set.
all these inputs I am collecting in an array and further passing to a function which is written in API which is not exposed , So API Function is returning output for mostly input which need to write in a csv like
1.Input-'AB',o/p of 'AB',o/p of 'ABX',o/p of 'ABY',o/p of 'ABZ'
2.Input-'CD',o/p of 'CD',o/p of 'CDX',o/p of 'CDY',o/p of 'CDZ'
and inputs for which I am not getting outputs they should be written as blank.
What I have tried:
This I am able to achieve with the help of running loops & write it in csv but I am facing the challenge for the inputs for which API function is not returning value . Now I am thinking to collect all the inputs in a Vector. The output I will collect in a Map by passing it to the API function will compare the input and output data structure to generate the output csv file. Am I in the right direction to achieve this or I should try any other approach?