anybody knows why ?
template<class T, int s> void Apprentissage<T, s>::apprendre_base(int k, double learning_rate) {
int min=s-s;
int max = s-1;
srand(time(NULL));
for (int i = 0; i < k; i++) {
int rd= rand()%(max-min+1) + min;
// cout<<rd<<endl;
T in(rd);
n->apprentissage(in,learning_rate) ;
}
}
Message : [Error] there are no arguments to 'srand' that depend on a template parameter, so a declaration of 'srand' must be available [-fpermissive], [Error] there are no arguments to 'rand' that depend on a template parameter, so a declaration of 'rand' must be available [-fpermissive]
Aucun commentaire:
Enregistrer un commentaire