为什么模板不支持分离编译?
这里讲解模版不支持分离编译之前,先要讲一下正常一个可执行程序在编译器中具体的几个步骤才能更好的理解模版为什么不支持分离编译。
main.cpp
#include<iostream>
#include"test.h"
using namespace std;
int main()
{
fun();
return 0;
}
test.cpp
#include<iostream>
using namespace std;
void fun()
{
cout << "fun()" <<