You have to show that every Cauchy sequence $(f_n)$ of $C(X)$ converges. Let $(f_n)$ be a Cauchy sequence of $C(X)$, for every $c>0$, there exists $N>0$ such that $n,m>N$ implies that $\sup_{x\in X}\mid f_n(x)-f_m(x)\mid<c,$ this implies that $(f_n(x))$ is a Cauchy sequence. Since $R$ is complete, $f_n(x)$ converges towards $f(x)$.
It remains to show that the function defined on $X$ by $x\rightarrow f(x)$ is continuous. Firstly, remark that there exists $N>0$, such that for every $x\in X$, $n,m>N$, $\sup_{x\in X}\mid f_n(x)-f_m(x)\mid <c/4$. This implies that $$\lim_{m\to\infty}\mid f_n(x)-f_m(x)\mid =\mid f_n(x)-f(x)\mid \leq c/4$$ for $n>N$.
Let $n>N$, since $f_n$ is continuous, there exists $e>0$ such that $d(x,y)<e$ implies that $\mid f_n(x)-f_n(y)\mid< c/4$. This implies that for $d(x,y)<e$ we have: $$\mid f(x)-f(y)\mid \leq \mid f(x)-f_n(x)\mid +\mid f_n(x)-f_n(y)\mid+\mid f_n(y)-f(y)\mid < c/4+c/4+c/4=3c/4<c.$$ Henceforth, $f$ is continuous
Let $f:X\to\mathbf{R}$ satisfying your hypotheses. There exists $K$ compact s.t. $f_{|X \setminus K}=0$.
Let's show $f$ is uniformly continuous. Let $\epsilon>0$. By Heine theorem applied to $f_{|K}$, $f$ is uniformly continuous on $K$:
$$\exists \delta_1>0 \; \forall (x, y) \in K^2 \; d(x,y) < \delta_1 \implies |f(x)-f(y)| < \epsilon$$
If $(x, y) \in (X\setminus K)^2$, $\delta_1$ works.
Now suppose by contradiction that there exists $\epsilon>0$ s.t. for all $n \in \mathbf{N}$, there exists $x_n \in K$, $y_n \in X\setminus K$ s.t. $d(x_n, y_n) < 2^{-n}$ and $|f(x_n) - f(y_n)| > \epsilon$. $(x_n)$ lies in a compact space, so there exists $\sigma$ strictly increasing and $x \in K$ s.t. $x_{\sigma(n)} \to x$. Then $y_{\sigma(n)} \to x$, but $|f(x_{\sigma(n)}) -f(y_{\sigma(n)})| > \epsilon$, thus $f$ is not continuous in $x$, contradiction.
Hence:
$$\exists \delta_2>0 \; \forall (x, y) \in K \times (X \setminus K) \; d(x,y) < \delta_2 \implies |f(x)-f(y)| < \epsilon$$
Finally $\delta = \min(\delta_1, \delta_2)$ works.
Best Answer
Take a particular example of a continuous function that goes to $0$ at $\pm \infty$, and a sequence of continuous functions of compact support that converges uniformly to it. This is a Cauchy sequence ...