cpp 模版函数

template <typename T>
void fillingTable(T ***table, int row, int column, int defaultValue = STATE_NULL){
    *table = new T*[row];
    for (int r = 0; r < row; r++){
        (*table)[r] = new T[column];
        for (int c = 0; c < column; c++){
            (*table)[r][c] = defaultValue;
        }
    }
}

 

posted @ 2015-08-31 12:17  晨祷  阅读(212)  评论(0编辑  收藏  举报