TITLE: example of a set that is closed and bounded but not compact
QUESTION [20 upvotes]: Find an example of a subset $S$ of a metric space such that $S$ is closed and bounded but not compact.

One such example that comes from analysis is probably a closed and bounded set in $C[0,1]$. I attempt to construct my own example to see if it works.
Is $\{ \frac{1}{n} | n \in \mathbb{N} \}$ endowed with discrete topology a set that is closed and bounded but not compact? My guess is that it is indeed an example of closed and bounded does not imply compact.
Every element is less than or equal to $1$, and it is closed  as a whole set. If we let $\mathcal{A}$ be a covering of the set that consists of singletons in $\{ \frac{1}{n} \}$ so that any finite subcover 
$\{ \frac{1}{n_j} |j =1,...,k \quad \text{and} \quad n_j \in \mathbb{N} \}$ will not cover $\{\frac{1}{n}\}$, because if we take $n = \max \{{n_j}\}, \frac{1}{n+1}$ is not in the finite subcover.
Thanks in advance for pointing out any mistake.

REPLY [2 votes]: Consider any infinite set $X$ with the metric $$d(x, y) = \begin{cases} 1 & x \neq y \\ 0 & x = y \end{cases} $$
This is called the discrete metric. Note that any $E \subseteq X$ is closed, open, and bounded, including $X$ itself. But $X$ is not compact. The open cover $\{ \{x\} : x \in X \}$ of $X$ by singletons had no finite subcover. Thus $X$ is not compact.