Skip to content

How to use Vector without knowing the length #9043

Answered by aditi-pandit
wypb asked this question in Q&A
Discussion options

You must be logged in to vote

@wypb : Is size parameter to TextFileRowReader::next the max number of rows we could output ?

If yes, then your code above is fine. Though I would make it a bit more readable by naming rowsToRead to numRowsLeft.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@wypb
Comment options

Answer selected by aditi-pandit
Comment options

You must be logged in to vote
1 reply
@wypb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants