Make spline mesh with C++

Hi, im new to C++.
How can i make a simple spline c++ class, that makes a mesh along the spline

I should be able to control the amount of mesh along spline by a variable