On Tuesday, 8 April 2014 at 14:52:02 UTC, Spacen Jasset wrote:
Are you not supposed to new structs anymore?
Only if they're pointers. new File returns a File*, not a File.But you shouldn't new a File because then the file won't be automatically closed when it goes out of scope (RAII indeed).
Your code should work if you just take out the new keyword.