C++Template学习

2021-06-07 00:03

阅读:550

标签:fun   cte   tmp   pre   code   out   div   char   public   

templatevoid funcTmp(T a, T b)
{
    cout "this is yiban"  endl;
}


template
void funcTmp(const char* a, const char* b)
{
    cout "this is char*"  endl;
}


templateclass CTem 
{
public:
    void func()
    {
        cout "this is usural func"  endl;

    }
};

void CTemchar>::func()
{
    cout "this is char func"  endl;
}

template
class CTemint>
{
public:
    void func()
    {
        cout "this is int func"  endl;

    }
};

 

C++Template学习

标签:fun   cte   tmp   pre   code   out   div   char   public   

原文地址:https://www.cnblogs.com/weiyouqing/p/14598400.html


评论


亲,登录后才可以留言!