Give an example of a continuous strictly increasing function $g\colon \Bbb R\to \Bbb R$ which is differentiable at every $x$ not belonging to $\Bbb Z$ and not differentiable at any $x$ belonging to $\Bbb Z$.
Could I use a piecewise function to show this?




Yes, a piecewise defined function will do it. We first do it for $x\ge 0$.
For $0\le x\lt 1$, let $f(x)=x$. For $1\le x\lt 2$, let $f(x)=1+2x$. For $2\le x\lt 3$, let $f(x)=3+4x$. For $3\le x\lt 4$, let $f(x)=7+8x$, and so on.
So for $0\le n\le x\lt n+1$, let $f(x)=2^n-1+2^n x$.
Verification that we do not have differentiability at the integers is reasonably straightforward, the slopes do not match.
For the part with $x\lt 0$, use $-(f(|x|+1)+1$.