A successive difference-of-convex approximation method for a class of nonconvex nonsmooth optimization problems