I've seen in some books and notes that in order to define the tangent vector $v:C^\infty(p)\to\mathbb R$, the author defines $C^\infty(p)$ as the set of all real valued functions $f:M\to\mathbb R$ such that does there exist an open set $U\subseteq M$ containing $p$ and $f|_U$ is smooth and then defines a tangent vector as a map $v:C^\infty(p)\to\mathbb R$ such that for all $f,g\in C^\infty(p)$ and $a,b\in\mathbb R$,
$$v(af+bg)=av(f)+bv(g)\\ v(fg)=f(p)v(g)+v(f)g(p).$$
So why we really need to insert smooth functions which are agree on some smaller open set containing $p$ in an equivalence class and define $C^\infty(p)$ as the set of these equivalence classes? And then define a tangent vector as the map $v:C^\infty(p)\to\mathbb R$ such that for all $[f],[g]\in C^\infty(p)$and $a,b\in\mathbb R$,
$$v[af+bg]=av[f]+bv[g]\\ v[fg]=f(p)v[g]+v[f]g(p)?$$
What are differences between first and second $C^\infty(p)$? Is the first definition a standard definition?