I am new to C++. I have a problem regarding access specified elements from a text File. I have two File containg the random sorted integert values. and an Array with some size.
For exapmle if array contain 10 elements and files will contain random number upto 10 with no element in common. such file one contain 1,4,7,8,10 then file 2 will contain rest of the elemnts 2,3,5,6,9.
My problem is how to fetch the specified elements from array and store them either file or an array.
For Example Suppose we have arr[10]= {2,4,7,3,7,8,1,7,3,1};
and file1 have elements 1,4,7,8,10 and File2 have elements 2,3,5,6,9.
so after performing operations my output arrays or text file contain
the corresponding data from array.
such as arr1[]={2,3,1,7,1} and arr2[]={4,7,7,8,3}
we can use text file also for storing these valuse........
please help me out
thanks in Advance....