Neuron simulation C++