Amr.Mohammad87 6 Light Poster

void assign(size_type n, el const T& el = T())

This function is a member function of the STL list class and I do not understand the bolded part. I understand the const T& el is a reference to a constant parameter which means I cannot change the value/content of the passed argument + I understand that el = T() means a default parameter so if there is no argument passed in the calling function the el will use the no-argument constructor of the T() type OK. But what make me confused the el at the beginning before the const?!!! so if someone can fill the blank gaps for me I will be grateful :). Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.