I have some difficulties solving the following exercise (Baby Rudin 2.24)
Let $ X $ be a metric space in which every infinite subset has a limit point. Prove that $ X $ is separable.
In order to solve this I try to find a connected set which contains an infinite subset that has no limit point.
So, the interval $ [0 \dots 1] $ is a connected set, but it is a compact one also.
According to Baby Rudin theorem 2.37 any infinte subset $E$ of a compact set $K$ has a limit point in $K$.
It appears that I can't find a subset to contradict exercise 2.24.
I know that there is a hint in the book, I try not to read it.