The following is a list of header lines for creating function templates. Which of them is legal?
- template < class T > swap ( T & x, T & y)
- template < T > void swap (T & x, T & y)
- class < template T> void swap (T & x, T & y)
- None of the above
Answer:
Option b: template < T > void swap (T & x, T & y)
Explanation Here
0 Comments