Sounds like it may be a dell laptop - the centre pin of the power is a data line and "talks" to the computer, there is a tiny ROM in the power supply which tells the laptop how much power it can provide, if this signal is not present then the laptop will work on mains or battery, but will not charge the battery.
Usually need another power supply.
The power "pins" are the outer and inner of the outside ring of the plug.
In a time of universal deceit - telling the truth is a revolutionary act. George Orwell
When the debate is lost, slander becomes the tool of the loser. Socrates