Re: Error "Unexpected '\n' when converting from type LockingTextReader to type int"

2022-09-07 Thread Synopsis via Digitalmars-d-learn
On Wednesday, 7 September 2022 at 23:06:44 UTC, rikki cattermole wrote: Text in buffer: "123\n" Read: "123" Text in buffer: "\n" Read: exception, expecting number for "\n" Changing your readf format specifier to include the new line should work. https://dlang.org/phobos/std_stdio.html#.File

Error "Unexpected '\n' when converting from type LockingTextReader to type int"

2022-09-07 Thread Synopsis via Digitalmars-d-learn
Hi! I'm new at programming, just discovered D and I'm loving it so far! I'm learning the basics, so please forgive my noob mistakes and questions (as well as my Engrish...). I'm trying to make this program print both numbers entered by the user, it works with the first number (num): ```d i