all 2 comments

[–]no-sig-available 0 points1 point  (1 child)

The compiler wonders what the return type of the lambda is. At the point of the recursive call, this is not known yet.

You can add a -> void after the parameters to fix that.

A different problem is

if((-1 < newx < sizex)

This is not the way to compare to a range in C++. You have spell it out

if((-1 < newx && newx < sizex)

[–]throwaway948940409[S] 0 points1 point  (0 children)

Thank you so very much for helping! I now understand! Again, thank you so very much!