This is a snapshot of my code:
int m = 3;
int l = 4;
int k - 6;
std::vector<int> perceptrons;
for(int i = 0; i < k; i++){
Perceptron Ki = Perceptron(m, l);
perceptrons.push_back(Ki);
}
I get the following error:
Main.cpp:102:33: error: no matching function for call to ‘std::vector<int>::push_back(Perceptron&)’
perceptrons.push_back(Ki);
I have a class Perceptron that are objects with the parameters m and l also obviously, basically I'm just trying to create a Vector of perceptrons.
Can anybody see why this is?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…