Can you tell that I've only been using C++ for two weeks and I'm already going bananas with it? Anyway: I'm writing a neural network simulation program - purely as a hobby, this isn't homework or anything. If I pass an array of pointers to objects, to a function, how can that function work out how many elements are in the array? Here's what I mean, and how I've tried to do it so far:
Code:
void Neuron::AdjustWeights(TrainingSet *trdata[], double eta)
{
short nt=sizeof(*trdata)/sizeof(*(trdata[0]));
// blah
}
It compiles fine, but when I run it I get that delightful dialog box saying the program's crashed. What am I doing wrong?
Thanks in advance!