Is anyone else having trouble with the various input functions from chapter 4? If use, say, the inputN() function on an instream generated from a text file, it returns a vector list, rather than a string list. This screws up the output of all my other functions as well.
This particular problem seems to have solved itself when we tried again after class on Tuesday. However, I'd like to clear up a point about the types of the IO functions, particularly those in TextIO. Sometimes the return type is described as a vector, but in particular the values returned are char vectors, which happens to be the same as type string.
2 comments:
Is anyone else having trouble with the various input functions from chapter 4? If use, say, the inputN() function on an instream generated from a text file, it returns a vector list, rather than a string list. This screws up the output of all my other functions as well.
This particular problem seems to have solved itself when we tried again after class on Tuesday. However, I'd like to clear up a point about the types of the IO functions, particularly those in TextIO. Sometimes the return type is described as a vector, but in particular the values returned are char vectors, which happens to be the same as type string.
Post a Comment