I have this code, and basically what I have to do is take the info from two archives to some arrays (both are types from certain classes). My problem is with the second array.
What I do is get the line and save it in a string (linea2) and from that line take two other strings; one of those two strings I turn it into an integer (because that's how it's called in the class, with an integer and a string)
Since the array is type class, and these are strings, I create a new class (which is type "Pasajero") and call aux2 as a random name for it, using as parameters the integer("idPas") and string ("nombre") obtained from the string "linea2".
From that point on though, when I compile the compiler stops working. I have no idea what's wrong, so if someone could help me I'd really appreciate it. Thanks! (sorry about the spanish words in the code xD)
The problem is somewhere else: when I comment out parts relating to other classes and compile, everything works as it should.
There is a problem if you uncomment array assignment next line though: cont variable will stay the way it ended after previous loop and possibly it can access out of array bounds if your textfile contains more that 25 entries.