In the book, Mr. Midshipman Hornblower, HMS Dreadnaught was commanded by Captain Foster at the time of Hornblower's examination for Lieutenant. There was no historical Dreadnaught in the time-line of this story, however there was a Dreadnaught, a fourth-rate ship of the line launched on 23 June 1742 and sold out of the service in 1784. The next Dreadnaught was launched on 13 June 1801 and was broken up in 1857, and was a second-rate ship of the line. Although the novel didn't indicate the type of ship, but the name Dreadnaught indicates that it was certainly a ship of the line.
HMS Dreadnaught (1742) in Wikipedia.
HMS Dreadnaught (1801) in Wikipedia.