Question: what is the difference between template and macro?
Answer: Templates cause code substitution, but obey a certain set of rules. That means that the compiler checks types before creating the new class/object. Macro are parsed by the Pre-processor, which only replaces text. ... The code generated by the Macro, however, can take a certain time to process.