we have defined template two times .Will it not create confusion for compiler that which template it is reffering to
Why do we have different template for both classes
Explain why we need to declare twice for both the classes even with same name.If we are giving template it is giving error.Will it not create confusion for compiler two templates with same name.Please explain
@KetanPandey template is associated with a particular class, you cant write it randomly anywhere in the code, it must be written next to the class only. So the compiler is not even looking anywhere else for another template, so there is no point of confusion
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.