Segmentation fault while reading a file

IchorDev zxinsworld at gmail.com
Thu Aug 1 07:03:04 UTC 2024


Hey just a heads up, you might wanna use 
[`readText`](https://dlang.org/library/std/file/read_text.html) 
and 
[`lineSplitter`](https://dlang.org/library/std/string/line_splitter.html) just so you don’t have to deal with file handles. Also you can use something like [`formattedRead`](https://dlang.org/library/std/format/read/formatted_read.html) for parsing formatted floats more easily.
Also please only use `in` if you have `-preview=in` and you know 
what it’s for. You were probably looking for `const`, because 
`in` with `-preview=in` is not useful for strings.


More information about the Digitalmars-d-learn mailing list