Existence of a pointwise convergent subsequence Let $X$ be a compact metric space and $f_m:X\to[0,1]$ a continuous function for each $m\in\mathbb N$.

Does there necessarily exist a $f:X\to[0,1]$ (not necessarily continuous) and a subsequence $(f_{m_k})$ such that $f_{m_k}(x)\to f(x)$ for each $x\in X$ pointwise?

Note that the equicontinuity of $(f_m)_{m\in\mathbb N}$ is not assumed, so that the Arzelà–Ascoli theorem is of no use here. However, the desired conclusion is also weaker: the supposed limit function $f$ need not be continuous and only pointwise convergence is required.
Any suggestion would be appreciated.
 A: A similar example using more machinery hence  perhaps less tricky in the details: Let $X=[0,2\pi]$, $f_n(t)=\cos(nt)$.  If $f_{n_k}(x)\to f(x)$ for (almost) every $x$ then Dominated Convergence shows that $||f_{n_k}-f||_2\to0$; this is impossible by orthogonality (for example, $||f_n-f_m||_2^2=2\pi$.)
A: No, there does not.  Consider $f_n(x) = \cos(4^n \pi x)$ on $[0,1]$ (with range in $[-1,1]$ not $[0,1]$, but you can transform it).  Then for any subsequence $f_{n_k}$, there is 
some $x \in [0,1]$ such that $f_{n_k}(x) \ge \cos(\pi/4)$ if $k$ is odd and $\le -\cos(\pi/4)$ if $k$ is even. All you need to do is choose the base-$4$ digits of $x$ correctly.  
EDIT: Any choice of the first $n$ digits after the "decimal" point leaves $x$ in an interval of length $4^{-n}$ on which $f_n$ goes either from $1$ to $-1$ or $-1$ to $1$.  Choose the $n+1$'th digit to be $0$ or $3$ to make $f_n(x) \ge \cos(\pi/4)$ or $\le -\cos(\pi/4)$ (which is which depends on the previous choices of digits).  For example, if you choose the first $3$ digits to be $0,3,0$,  that says $x$ is between $0 \times 4^{-1} + 3 \times 4^{-2} + 0 \times 4^{-3} = 3/16$ and $0 \times 4^{-1} + 3 \times 4^{-2} + 1 \times 4^{-3} = 13/64$,
say $x = 3/16 + 4^{-3} t$, $0 \le t \le 1$.  On this interval, $f_3(x) = \cos(4^3 \pi x) = \cos(\pi t)$ goes from $1$ at $t=0$ to $-1$ at $t=1$.  If you want $f_3(x) \ge \cos(\pi/4)$, choose the $4$'th digit to be $0$, if you want $f_3(x) \le - \cos(\pi/4)$ choose the $4$'th digit to be $3$.
