a 12 VDC charger isn't quite as simple as grabbing one off the shelf at Radio
Shack. You need to make sure it's input voltage range is adequate to handle the variation it'll see from your boat's batteries--anywhere from 12 VDC or a little less up to 14.8 VDC when the charging system is on.
You also need to match the voltage and amperage requirements of your laptop. If you look at the "fine print" on the bottom of the charger "brick" that came with your laptop, you'll see it's electrical
output specs. Mine says 19 VDC and 3.42 Amps. Multiplying the two, that's 65 Watts. So I need an adapter that will put out a steady 19 VDC and 65 Watts of power.
The simplest and safest thing to do is to buy one that's designed to work with your specific laptop.
Targus makes it easy. They have a tool on their website
that tells you exactly which of their 12 VDC chargers will work with your particular laptop. Some of the other reputable manufacturers, like Kensington, may have similar help available, also.