Hello, my program is long but I need to have two 2-D arrays.
The first thing is to read from a text file which looks like:
00100009
00200004
00300000
84
01001
05002
21003
The store the first 3 lines into the array1 and then then from "01001" into array2. The 84 is that while reading line by line the compiler can say where to store in a different array.
The hard part is to store the first 3 characters of the first lines onto the first row of array1 and the rest in the second.
Same thing with the array2, the first 2 characters have to go to the first row and the rest to the second.
I really appreciate any suggestions, I have tried doing it with vectors but i then to split the element of the vector I believe I have to convert too many times to have an easy access to parts on the strings.
Well, as you might see my knowledge in c++ has just started any idea on how to do it or what functions to use.
Thank you so much, and this website has helped a lot. I just donĀ“t think that i will be able to it without help within a week.
Hey jalfor, thanks a lot for the reply, my professor helped me an now im using 2 classes instead.
But what i need to do is put the first part in a different array than the second part, and the "84" is the point to differentiate the data.
And the other hard part was to be able to split each line into two part, that by using the class got easier.
Thanks and i will appreciate if u have an idea on how to make a good simulation of the IAS machine as functions in c++.