In the book of Lee (page 35 of second edition) on smooth manifolds, for a map $f : M \rightarrow N$ between manifolds to be smooth, we have to prove in particular that for each point p in $M$ there is a coordinate domain $U$ containing p and V containing $f(p)$ such that $f(U) \subset V$ . I think he says that we cannot always have this if f is not continuous and he gives the example :
$ f(x) = \begin{cases} 0 \text{ if } x < 0 \\ 1 \text{ if } x \ge 0 \end{cases} $
but even in $p=0$ it seems to me that if we take $U=(-2,2)$ and $V=(-2,2)$ everything is okay. There is something I don't get here.
Note that for this function $f\colon \mathbb R\to \mathbb R$ to be smooth by my definition (which, as you pointed out, is the same as the one given by Wikipedia), there must be charts $(U,\varphi)$ containing $0$ and $(V,\psi)$ containing $1$ that satisfy two conditions:
If, as you suggested, you take $(U,\varphi) = (V,\psi) = ((-2,2),\text{id})$, then #1 is satisfied but #2 is not.
On the other hand, the point of the problem you're looking at is to show that you can find another pair of charts that satisfies #2 but not #1.
The moral is that you need to be able to find charts satisfying both conditions in order to claim that $f$ is smooth, and for this particular $f$, there are no such charts.