So I'm working on a C++ project, and came across this overloaded constructor that functioned perfectly, but I don't quite understand why it's functioning correctly. The n(n) confuses me altogether, and I'd prefer if that information was within the overloaded constructor itself. What is this actually accomplishing?
Overloaded constructor:
caesarCipher::caesarCipher(int n) : n(n) {}
Default constructor:
caesarCipher::caesarCipher()
{
n = 1;
}