this questions for C++ for how to use getline() function get all the data from input file.
I have input file like that:
I am trying to create the get data function to get all the data from the input file. the first people in the input file is manager which just have one with manager id , name and salary.
the manager have 5 salesman which has slaesman id, name gender, and no of customer. customer information is under salesman which just have name and sales.
I create one class for manager to contain all the the information of manager. one array for salesman to contain all the information for salesman. one struct in salesman array to contain all the customer. below is my declearation of all the data and the function to get all the data from file.
however, I cannot use getline(inData,SalesmanList[i].SalesmanName; to get the salesman name. could any of you fix my get data function?