A 45-year-old man has drowned while attempting to save his daughter swept out in the surf on the NSW far north coast.