#include <iostream>
using namespace std;
template <class t>
class spunky
{
public:
spunky(t x)
{
cout << x << " is not a character" << endl;
}
};
template <>
class spunky<char>
{
public:
spunky(char x)
{
cout << x << " is indeed a character" << endl;
}
};
int main()
{
spunky<int> obj1(7);
spunky<double> obj2(7.143);
spunky<char> obj3('q');
}
网友评论