It is known that the piecewise linear continuous functions form a dense set in the metric space $C[a,b]$ of continuous real valued functions on the compact interval $[a,b]\subset \mathbb{R}$ with "the supremum" metric $d(f,g)=\sup\limits_{t \in [a,b]} |f(t)-g(t)|$ for $f,g \in C[a,b]$.
Consider subspace $X=\{f\in C[a,b]: f(a)=f(b)\}$ of the metric space $(C[a,b],d)$. How do I show that the set of all piecewise linear functions $g$ on $[a,b]$ such that $g(a)=g(b)$ form a dense subset in $X$?