Can you check my proof on piecewise linear approximations? Suppose that $f :[a,b]\rightarrow \mathbb{R}$ is continuous. Let $\epsilon>0$. Show that there exists a continuous, piecewise linear function $g: [a,b]\rightarrow \mathbb{R}$ such that $|f(x)-g(x)|<\epsilon$ for all $x$ in $[a,b]$.
Proof: Suppose that $f$ is continuous at $p$. Then for every $\epsilon>0$ there exists a $\delta>0$ such that
 $ |f(x)-f(p)|<3\epsilon $ for all points $x$ in $[a,b]$ for which $|x-p|<\delta$.
let $|g(p)-f(p)|<\epsilon$ for some $\epsilon$, then
$|f(x)-f(p)|= |f(x)-g(x)+g(x)-g(p)+g(p)-f(p)|\leq|f(x)-g(x)|+|g(x)-g(p)|+|g(p)-f(p)|<3\epsilon$
we get $|g(x)-g(p)|<\epsilon$ since $|f(x)-g(x)|<\epsilon$ and $|g(p)-f(p)|<\epsilon$. Hence there exists a continuous, piecewise linear function $g$.

Others have already remarked that your $g$ coming out of nowhere is a somewhat fluffy object. There is one more thing: You can do better than just "proving existence". Think of how you would go about constructing such a $g$ when the graph of $f$ is given to you and then make a proof out of your line of thinking.
