measurable bounded function on compact metrizable is a pointwise limit of continuous I can't prove the following:
Let $X$ be a compact metric space. Denote by $B(X)$ the set of bounded Borel measurable functions on $X$ with values in $\Bbb{C}$. Show that if $f\in B(X)$ is non-negative then there exists a sequence $(f_n)_n$ in $C(X)$ s.t. $f_n\rightarrow f$ pointwise.
I know that any $f\in B(X)$ is a uniform limit of simple functions. I've tried to look on similar questions. I have seen that if we don't assume compactness of $X$ and that $f$ is bounded that it is not necessarily true. I don't know how to prove this. Is it true also for general function, i.e. not non-negative?

Thanks

For definiteness, let's consider the case $X=[0,1]$. A real function on $[0,1]$ that is the pointwise limit of continuous functions must itself  have at least one point of continuity (by a well-known characterization of functions of Baire class 1). The characteristic function $f=1_{\mathcal Q\cap[0,1]}$ of the rationals in $[0,1]$ is Borel measurable but has no points of continuity.
