$\newcommand{\CP}{\mathbb{C}\mathrm{P}}\newcommand{\Z}{\mathbb{Z}}$(Let the notation $H^*(X)$ represent $H^*(X;\Z)$, i.e. ordinary unreduced cohomology with $\Z$ coefficients.)
The standard inclusion $\CP^{n-1}\hookrightarrow\CP^{n}$ induces a cofiber sequence $$\CP^{n-1}\longrightarrow\CP^{n}\longrightarrow S^{2n}$$ Since the connecting homomorphisms are trivial, there is a short exact sequence corresponding to this, $$0\longrightarrow H^{2n}(S^{2n}) \longrightarrow H^{2n}(\CP^{n})\longrightarrow H^{2n}(\CP^{n-1})\longrightarrow 0$$ The cohomology ring $H^*(\CP^k)$ is isomorphic to $\Z[x]/(x^{k+1})$ with $|x|=2$, so this is just the short exact sequence $$0\longrightarrow \Z\longrightarrow \Z\longrightarrow 0\longrightarrow 0$$ with the middle $\Z$ being the subgroup of $\Z[x]/(x^{n+1})$ generated by the multiples of $x^n$.
It seems only reasonable to assume that the image of $1\in\Z\cong H^{2n}(S^{2n})$ is the element $x^n\in H^{2n}(\CP^{n+1})$, but how do we know its image is not $-x^n$?
(In fact, I'm a little unclear on whether there is a canonical choice of an element $1$ in $H^{2n}(S^{2n})$, and similarly, if there is a canonical choice of element $x$ in $H^2(\CP^n)$. Does this have something to do with orientations?)
Thanks for any help!