« first day (2144 days earlier)      last day (692 days later) » 

4:47 AM
Why this code sippet dose not compile?
 
 
3 hours later…
nwp
8:04 AM
> static assertion failed: unique_ptr's deleter must be invocable with a pointer
In other words, std::unique_ptr doesn't know what to pass for ret_ptr.
You can get the effect that you're apparently aiming for by capturing ret.
Alternatively you could just use std::ifstream.
You could also put the FILE and the int ret& into a struct and make a std::unique_ptr for said struct.
Personally I recommend you give up on using C with tiny amounts of C++ as necessary. It's not a good language, you will lose out on both C and C++ advantages and it's not even suitable for transitioning. Just take a leap of faith and go full C++ for a while, see how it works out.
 
 
2 hours later…
10:24 AM
that error message output seemed pretty tame, I would've expected some more chaotic stuff. Seems like error message in some cases are still getting better little by little
 

« first day (2144 days earlier)      last day (692 days later) »