Caroline Knapp, a writer and columnist whose memoir ''Drinking: A Love Story'' vividly chronicled her struggle to overcome alcoholism, died yesterday at a hospital in Cambridge, Mass. She was 42 and lived in Cambridge.

The cause was lung cancer, her family said.

In ''Drinking'' Ms. Knapp wrote about the disturbing incongruities of her life as what she called a ''high-functioning alcoholic'': she was an award-winning journalist, an Ivy League graduate from a well-to-do New England family and by all appearances a happy, healthy and successful young woman. But drinking had slowly taken hold of her life, and she was desperate to conceal its effects.

She was, she wrote, ''smooth and ordered on the outside; roiling and chaotic and desperately secretive underneath, but not noticeably so, never noticeably so.''

The book, published by Dial Press in 1996, was praised by critics for its painful honestly in describing the grip of addiction and the difficulty of overcoming it. In a review in The New York Times, Christopher Lehmann-Haupt called it ''a remarkable exercise in self-discovery.'' The book remained on The New York Times best-seller list for several weeks in both hardcover and paperback editions.

In ''Drinking'' Ms. Knapp characterized her addiction as a bad love affair. In her next book, she found a healthier relationship. ''I am in love with my dog,'' she wrote near the beginning of ''Pack of Two: The Intricate Bond Between People and Dogs'' (Dial Press, 1998).

''I'm 38 and I'm single,'' she continued, ''and I'm having my most intense and gratifying relationship with a dog. But we all learn about love in different ways, and this way happens to be mine.''

''Pack of Two'' was also a best-seller and, like ''Drinking,'' it commingled autobiography with nonfiction in its passages on dog rearing and pet-inspired self-analysis like ''I understand the impulse to romanticize the dog; I struggle with it myself.''

Ms. Knapp developed her style in her years as a columnist at The Boston Phoenix, an alternative weekly newspaper where she worked from 1988 to 1995 and to which she continued to contribute until 1999. Her ''Out There'' column, in which she often wrote about the travails in life and love of a semifictional 30-something single woman named Alice K. -- ''not her real initial'' -- was one of the paper's most popular features and won her an Alternative Newsweekly Award in 1996. She was often light and humorous in the paper, but could be poignantly confessional, as in a memorable column about her struggles with anorexia.

Her columns, were collected in 1994 in the book ''Alice K.'s Guide to Life: One Woman's Quest for Survival, Sanity and the Perfect New Shoes'' (Dutton/Plume).

Ms. Knapp graduated with honors from Brown University and worked as a reporter for The Boston Business Journal before joining at The Phoenix, where she was a features writer and later the lifestyle editor.

Her lung cancer was diagnosed in mid-April, and on May 11 she married Mark Morelli. She had recently completed work on a book about women's appetites.

In addition to her husband, she is survived by a sister, Rebecca, of West Boylston, Mass.; and a brother, Andrew, of Salem, Mass.