Can $\mathbb CP^n$ be the boundary of a compact manifold?

Short answer: For $n$ odd, yes. For $n$ even, no.


The explanation for each case:

$n$ odd: There is a fibration $$S^2 \hookrightarrow \mathbb{C}P^{2n+1} \longrightarrow \mathbb{H}P^n.$$ Then the associated disk bundle $$D^3 \hookrightarrow E \longrightarrow \mathbb{H}P^n$$ has as total space a compact manifold $E$ with boundary $\mathbb{C}P^{2n+1}$.

$n$ even: By a result of Thom, a smooth manifold bounds a compact manifold if and only if all of its Stiefel-Whitney numbers are zero. For $\mathbb{C}P^{2n}$, we have that $$\langle w_{4n}(\mathbb{C}P^{2n}), [\mathbb{C}P^{2n}] \rangle = \chi(\mathbb{C}P^{2n}) \pmod 2 = 1 \neq 0,$$ so $\mathbb{C}P^{2n}$ has a nonzero Stiefel-Whitney number. Therefore $\mathbb{C}P^{2n}$ cannot bound any compact manifold.


You are dipping your toe in bordism theory if you want to google around. Bordism groups $\Omega_k$ are defined to be generated by (oriented) $k$-manifolds, modulo the equivalence relation of cobordism. ($M_1\sim M_2$ if $M_1\cup(-M_2)=\partial W$ for some $W$.) The group operation is either disjoint union or equivalently connected sum. Then $\mathbb{CP}^k$ bounds a manifold iff it is trivial in $\Omega_k$.

$\mathbb{CP}^2$ is the simplest orientable example of a manifold which is not the boundary of another manifold. (Okay a point is the simplest!) The simplest nonorientable example is $\mathbb{RP}^2$.

Indeed, using the signature invariant, one can show that all $\mathbb{CP}^{2k}$ are not boundaries. Rene Thom actually showed that $\oplus \Omega_k\otimes \mathbb Q$ is generated as a ring by the manifolds $\mathbb{CP}^{2k}$ (multiplication is cartesian product). Torsion elements are a lot more difficult to classify.

So the signature shows that $\mathbb{CP}^{2k}$ are not boundaries, and by Thom's result, a disjoint union of some number of copies of $\mathbb{CP}^{2k+1}$ must bound a higher-dimensional manifold. I suspect that these manifolds actually are null-bordant as is. Presumably one can construct a bounding manifold by hand.