You could write the noise functions you need yourself. But it’s usually much more practical to use a library where the functionality has already been coded and tested. For C++, libnoise is an open-source implementation of several types of coherent noise, including Perlin noise.
Even if you are not going to use the library directly, you might find the explanations of different coherent noise functions enlightening. The tutorials are specific to the library, but the principles of creating textures by combining multiple functions can be generalized.