  It is well known that the Hodge conjecture with rational coefficients holds
for degree 2n-2 classes on complex projective n-folds. In this paper we study
the more precise question if on a rationally connected complex projective
n-fold the integral Hodge classes of degree 2n-2 are generated over $\mathbb Z$
by classes of curves. We combine techniques from the theory of singularities of
pairs on the one hand and infinitesimal variation of Hodge structures on the
other hand to give an affirmative answer to this question for a large class of
manifolds including Fano fourfolds. In the last case, one step in the proof is
the following result of independent interest: There exist anticanonical
divisors with isolated canonical singularities on a smooth Fano fourfold.
