In my course notes of topology, we have seen the following example of a space that is connected but not path-connected.
Define $X := \{(0,0)\} \cup \{(x,\sin(\frac{1}{x}))\mid x > 0\}$
I understand why this is connected but I have troubles by arguing why it's not path-connected. my opinion: consider $X$ is path-connected
for $x = (0,0)$ and $y = (1,\sin(1))$ , there is a continuous function $f\colon [0,1] \rightarrow X: 0 \mapsto x, 1 \mapsto y$
because $[0,1]$ is compact and $f$ is continuous, $X$ is compact. I think that $X$ is not compact but I can't prove why. If I can prove this, $f$ can't be continuous and then it's ok.