#ifndef ANN_H
#define ANN_H
#include <iostream>
#include <vector>
#include "TrainData.h"
usingnamespace std;
class Neuron {
protected:
vector<double> weights;
double theNeuron;
public:
double GetNeuronData() const;
void PrintWeights();
void SetWeights(int n);
};
class HiddenNeuron : public Neuron {
public:
void SetNeuronData(double down, double pass, int i);
};
class OutputNeuron : public Neuron {
public:
void SetNeuronData(vector<HiddenNeuron> neurons);
};
class ANN {
private:
vector<HiddenNeuron> hidden;
OutputNeuron output;
public:
double GetOutputValue() const;
void JustDoIt();
void SetData(double down, double yards);
};
#endif
So I am getting 2 errors that I need help explaining. Here is both of them.
ANN.cpp: In member function ‘void ANN::JustDoIt()’:
ANN.cpp:36: error: ‘class std::vector<HiddenNeuron, std::allocator<HiddenNeuron> >’ has no member named ‘SetWeights’
ANN.cpp: In member function ‘void ANN::SetData(double, double)’:
ANN.cpp:85: error: ‘SetNeuronData’ was not declared in this scope
ANN.cpp: In member function ‘void ANN::JustDoIt()’:
ANN.cpp:36: error: ‘class std::vector<HiddenNeuron, std::allocator<HiddenNeuron> >’ has no member named ‘SetWeights’
You are trying to called SetWeights on your ANN::hidden vector. What exactly are you trying to do here?
ANN.cpp: In member function ‘void ANN::SetData(double, double)’:
ANN.cpp:85: error: ‘SetNeuronData’ was not declared in this scope
You are trying to push_back the results of some function SetNeuronData(), which doesn't exist.
Ok so I see what I did wrong for the second one but the first one confuses me still. I need to set the weights first so I was calling the function to set the weights but it says that it doesn't exist. why?\