Find $f:\mathbb R \to \mathbb R$ an almost everywhere continuous function such that there isn't any $g:\mathbb R \to \mathbb R$ continuous function with $f=g$ a.e..
My attempt at a solution
I was trying to construct a function $f$ of such characteristics and I thought of a function which is constant on intervals of the form $(n,n+1)$ for $n$ integer and has jumps of height $1$ between any two integers. I didn't know how to explicitly define this function, but the idea is $f$ on $[0,1)$ has the value $0$; on $[1,2)$ takes the value $1$; on $[2,3)$, $0$, and continue this way and define it the same way for the negatives.
It is clear that this function is continuous almost everywhere (except at the integers), but I didn't know how to show that it can't be extended to a continuous function on the real line. I would appreciat any suggestions or help to prove this and also if there is a nice way to define the function I've just constructed.