Theorem: Let $\Omega\subset \mathbb{R}^n$ be an open set and $1\leq p < \infty$. The space $C_c(\Omega)$ is dense in $L^p(\Omega)$.
Haim Brezis has a French book called "Analyse fonctionnelle: theorie et applications" (my version, Análysis Functional: Teoría y aplicaciones, is Spanish) that says:
We know that $C_c(\Omega)$ is dense in $L^1(\Omega)$. So, we can suppose $1<p< \infty$. To prove that $C_c(\Omega)$ is dense in $L^p(\Omega)$ it's enough to show that if $h\in L^{p'}(\Omega)$ satisfies $$\int_\Omega hu=0\,\textit{ for all }\,u\in C_c(\Omega),$$ then $h=0$.
Here $p'$ is a number such that $1/p+1/p'=1$. Could someone explain me why is it enough to prove it?
Note: The rest of the proof is to show that $h$ is locally integrable to conclude that $$\int_\Omega hu=0\text{ for all }u\in C_c(\Omega)\Rightarrow h=0.$$
This proof seems "different" of other proofs (like this one) that uses, for example, approximation by simple functions.
Thanks.