A complex line bundle is trivial if and only if the first Chern class is zero Let $\xi$ be a complex line bundle over a CW-complex $B$. I want to prove that $\xi$ is trivial if and only if $c_1(\xi)=0$.
My attempt: Suppose $c_1(\xi)=0$. Then the Euler class $e(\xi)=0$. Since $e(\xi)=o_2(\xi)$,  there exists a nonvanishing cross section of $\xi|_{sk^2 (B)}$, denoted as $X\in \Gamma(\xi|_{sk^2 (B)})$. $X,JX$ are linearly independent cross sections of $\xi|_{sk^2 (B)}$. Thus $\xi|_{sk^2 (B)}$ is a trivial bundle. How to prove that $\xi$ is trivial?
 A: Let us approach the case of complex manifolds by means of sheaf cohomology.
On a complex manifold $M$, the homolorphic/$C^\infty$ line bundles may be identified with $H^1(M, \mathcal O^*)$ and $H^1(M, \mathcal A)$, respectively (the sheaf cohomology with coefficients in non-vanishing holomorphic/$C^\infty$ functions).
The holomorphic exponential exact sequence of sheaves
$$0 \to \mathbb Z \stackrel{2\pi\cdot}\to \mathcal O \stackrel{\exp}{\to} \mathcal O^* \to 0 \hspace{2em} (1)$$
induces boundary homomorphism
$$c_1: H^1(M, \mathcal O^*) \stackrel{\delta}{\to} H^2(M, \mathbb Z),$$
which may be taken as the definition of the first Chern class of a holomorphic line bundle.
Moreover, the inclusion of $(1)$ into the $C^\infty$ exponential exact sequence of sheaves
$$0 \to \mathbb Z \stackrel{2\pi\cdot}\to \mathcal A \stackrel{\exp}{\to} \mathcal A^* \to 0, \hspace{3em}$$
by the functoriality of sheaf cohomology, induces the following commutative diagram:
$$\begin{array}{ccl}
H^1(M, \mathcal O)&\to&H^1(M,\mathcal O^*)&\to&H^2(M,\mathbb Z)\\
\downarrow&&\hspace{2em}\downarrow&&\hspace{2em}\|\\
H^1(M, \mathcal A)&\to&H^1(M,\mathcal A^*)&\to&H^2(M,\mathbb Z),\\
\end{array}$$
where $H^1(M, \mathcal A)=0$ holds from the existence of a (real) partition of unity, so $$H^1(M, \mathcal A^*) \hookrightarrow H^2(M, \mathbb Z)$$ is an inclusion, and the map $H^1(M, \mathcal O^*) \to H^1(M, \mathcal A^*)$ is the tautological forgetting map from holomorphic line bundles to $C^\infty$ line bundles.
Therefore, the first Chern class of a holomophic line bundle completely  determines it as a $C^\infty$ bundle. For more details, see Griffiths, Harris, "Principles of Algebraic Geometry", section 1.1 or the following answer on ResearchGate.net.
By the way, the kernel 
$$\mathfrak P = \ker c_1: H^1(M, \mathcal O^*) \to H^2(M, \mathbb Z)$$
is called the Picard variety of a complex manifold $M$, or the Jacobi variety if $M$ is a curve, which is a complex torus of the dimension equal to the genus of the curve.
Moreover, the Torelli theorem states that a smooth complex projective curve is completely determined by its Jacobi variety with some additional structure, therefore there is a wide gap between holomorphic line bundles which are holomorhically and $C^\infty$ trivial.
A: Let $\xi:E \to B$ be a complex line bundle. 
Edit: my first attempt was not true in that generality, although vanishing euler class is equivalent to nowhere vanishing section if the bundle has the same rank as the underlying complex which should be a closed orientable manifold. 
To make up for it I will try to give a description to solve your problem correctly.
We know that every complex $n$-vector bundle $\xi$ over $B$ is given by the pullback along a map $B \to  G_n(\mathbb C^\infty)=G_n$, where the latter is unique up to homotopy. For line bundles we get $G_1 = \mathbb CP^\infty$. We know that $G_1$ is a $K(\mathbb Z,2)$, so it has a natural identification $[B,G_1] = H^2(B;\mathbb Z)$, hence by the above comment: $\{\text{iso-classes of line bundles}\} = H^2(B;\mathbb Z)$. This gives you your result.
Further notice: you can equip the iso-classes of line bundles with the structure of an abelian group. Looking closer to the identifications above (especially the Eilenberg Maclane space property) you will notice that this is in fact an isomorphism of groups.
