Notice: Undefined offset: 152561 in /var/www/html/qa-external/qa-external-users.php on line 744
when you create a class template why you cant use cpp - OnlineGDB Q&A
Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

when you create a class template why you cant use cpp

0 votes
asked May 9, 2019 by anonymous

1 Answer

+1 vote
answered May 22, 2019 by (1,230 points)
Well, technically, you could make a class template with a .cpp extension and include it in another source file. However, this is not how it is normally done. For any type of file that you want to include in another source file (or another header for that matter), the .h or .hpp extension is used.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...