一下是编译信息:
Compiling...
Cpp1.cpp
C:\Users\123\Desktop\practice 5\Cpp1.cpp(16) : error C2955: 'Compare' : use of class template requires template argument list
C:\Users\123\Desktop\practice 5\Cpp1.cpp(14) : see declaration of 'Compare'
C:\Users\123\Desktop\practice 5\Cpp1.cpp(16) : error C2955: 'Compare' : use of class template requires template argument list
C:\Users\123\Desktop\practice 5\Cpp1.cpp(14) : see declaration of 'Compare'
C:\Users\123\Desktop\practice 5\Cpp1.cpp(16) : error C2065: 'numtype' : undeclared identifier
C:\Users\123\Desktop\practice 5\Cpp1.cpp(16) : error C2146: syntax error : missing ')' before identifier 'a1'
C:\Users\123\Desktop\practice 5\Cpp1.cpp(16) : error C2350: 'Compare::Compare<numtype>::Compare<numtype>' is not a static member
C:\Users\123\Desktop\practice 5\Cpp1.cpp(16) : error C2059: syntax error : ')'
C:\Users\123\Desktop\practice 5\Cpp1.cpp(16) : error C2065: 'a1' : undeclared identifier
C:\Users\123\Desktop\practice 5\Cpp1.cpp(16) : error C2501: 'a' : missing storage-class or type specifiers
C:\Users\123\Desktop\practice 5\Cpp1.cpp(16) : error C2065: 'b1' : undeclared identifier
C:\Users\123\Desktop\practice 5\Cpp1.cpp(16) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
C:\Users\123\Desktop\practice 5\Cpp1.cpp(18) : error C2955: 'Compare' : use of class template requires template argument list
C:\Users\123\Desktop\practice 5\Cpp1.cpp(14) : see declaration of 'Compare'
C:\Users\123\Desktop\practice 5\Cpp1.cpp(18) : error C2955: 'Compare' : use of class template requires template argument list
C:\Users\123\Desktop\practice 5\Cpp1.cpp(14) : see declaration of 'Compare'
C:\Users\123\Desktop\practice 5\Cpp1.cpp(18) : error C2143: syntax error : missing ';' before 'tag::id'
C:\Users\123\Desktop\practice 5\Cpp1.cpp(18) : error C2501: 'numtype' : missing storage-class or type specifiers
C:\Users\123\Desktop\practice 5\Cpp1.cpp(18) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
Cpp1.obj - 1 error(s), 0 warning(s)