C.S. Forester literally asked him for some notes for a story. Roal Dahl sent back a 'Piece of Cake'. Forester responded ""Did you know you were a writer? I haven't touched a word..."". The rest is history. The only question really is how did Joseph Heller write Catch 22 before Dahl ended up doing so.
For bonus trivia: Hayao Miyazaki ripped off "They Shall Not Grow Old" wholesale for the best sequence in Porco Rosso. "Beware of the Dog" was adapted for the George Seaton thriller '36 Hours'.