How to code templates. Because all the implementation needs to be in one single file. If I code in .hpp I cannot do a printf and see where I am going wrong in implementation. What I was doing was, write everything in main.cpp at first and then move the required in .hpp. Is it a good practice?