top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

C++: When a programmer prefer using template class and template function ?

0 votes
445 views

While doing design for a software, what things enforce to use template classes and template functions ?
Is it consider best practices or not ?

posted Sep 20, 2016 by Rupam

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Hi Rupam
I am Rajan.Your question is very interesting actually i am saying it should be used.
I use template in c++ because It provide lots of predefined data structure and algorithm due to I save my lot of time write code for implementing such data structure.
Template in c++ is favourite of competitive coders.

answer Sep 27, 2016 by Rajan Paswan
Similar Questions
+1 vote

In large product based companies LLD is written by senior team members and developers write the code.
Does the senior team member decide what data type they should use in advance ? If yes then what things derives type of data for example. How they decide a variable should be declared as volatile ? and what would be advantage of having a variable volatile and what could be the problem if it is taken without the volatile ?

+2 votes

I know the definition of singleton class i.e. a class for which only one object can be defined or initialized. But I want to know all the possible ways to achieve this restriction.

...