How to code templates????

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?
If I code in .hpp I cannot do a printf and see where I am going wrong in implementation.

Yes, you can call printf in a .hpp as long as that .hpp includes <cstdio> or <stdio.h>
wow..... never realized that..... thanks.....
Topic archived. No new replies allowed.