On Sat, Jan 20, 2024 at 02:33:24PM +0000, atzensepp via Digitalmars-d-learn wrote: > Hello, > > I am new with D and want to convert a c program for a csv file manipulation > with exhaustive dynamic memory mechanics to D . > > When reading a CSV-file line by line I would like to create an associative > array to get the row values by the value in the second column. > Although I save the rows in an array (to get different pointers to the > values) the program below always gives the last row. [...]
Because .byLine reuses its line buffer. You want .byLineCopy instead. T -- Everybody talks about it, but nobody does anything about it! -- Mark Twain