Let $h:\mathbb{R}\to\mathbb{R}$ be a function that is continuous on $\mathbb{R}$ and has the property that
$h\left(\frac{m}{2^n}\right)=0,\quad\forall m\in\mathbb{Z},n\in\mathbb{N}.$
How can we show that this implies that $h(x)=0$, $\forall x\in\mathbb{R}$?
The way I thought about this problem is to show that the set
$ S:=\left\{\frac{m}{2^n}:\forall m\in\mathbb{Z},n\in\mathbb{N}\right\}$
is dense in $\mathbb{R}$. It then follows that for any $c\in\mathbb{R}$ there exists a sequence $(x_n)$ that converges to $c$ such that all the terms are of the form $p/2^q$. Thus, the sequence $(h(x_n))$ converges to $0$ and so by the sequential criterion for continuity we must have $h(c)=0$.
Is there a simpler approach? Proving that $S$ is dense in $\mathbb{R}$ seems overly complicated for this problem. Or, can we deduce it from the density of $\mathbb{Q}$ in $\mathbb{R}$?