when a text file is given in this format which is ordered and has no commas or any characters-
60
Rajkumar
70
Harish
...
its clear that the file needs to first read an integer and then a string without encoutering any other character.
but if the file has an order like
ABB, 15
Acc, 15, 18, 20
...
or is unordered, how can the data be read knowing that the file pointer will encounter a string or a number??
the objective of the program is to compare the numbers in two files under the same string name
like, the above text file is file 1 and the second file contains-
to understand the problem, let the strings be company names and the numbers that follow are the details of the companies opening, closing , nse, bse..etc.. prices for a day.
I need to take these two different files of day1 and day2 and compare( or manipulate) the numbers of the particular company.
But here is the basic problem, how do i identify and store the numbers when i read the file?