Am I going in the right direction?
Suppose that $f: \mathbb{R} \to \mathbb{R}$ is continuous on $\mathbb{R} $ and that $f(r)=0$ for every rational number $r$. Prove that $f(x)=0$ for all $x$ in $\mathbb{R}$.
Proof:
Since $r \in \mathbb R $, then $\forall \epsilon \gt 0$, $\exists \delta \gt 0$ such that if $\lvert x-r \rvert \lt \delta$ $\forall x \in \mathbb R $, then $\lvert f(x)-f(r) \rvert = \lvert f(x) \rvert \lt \epsilon$.
Since $\lvert f(x) \rvert \lt \epsilon$, it follows that $f(x)=0$ $\forall x \in \mathbb R $.