1

なぜ私は得るのですか:

missing template arguments before ‘(’ token

使用時:

sort(index_mu.begin(), index_mu.end(), index_cmp(mu_pt_corrected));

どこにいてどこにindex_muいるstd::vector<int>mu_pt_correctedstd::vector<float>

template<class T> struct index_cmp {
    index_cmp(const T arr) : arr(arr) {}
    bool operator()(const size_t a, const size_t b) const
    { return arr[a] > arr[b]; }
    const T arr;
};

コンパイラは の型を理解できないのTですか? なんで?

4

1 に答える 1