Expected primary expression

I have a class called Neuron that has a function called step() that I want to call one of two functions depending on which I have chosen in another file.

1
2
3
4
5
6
7
8
9
class Neuron {
private:
	// stuff
	void EIFstep(double g_AMPA, double g_NMDA, double g_GABA, double g_in);
	void HHstep(double g_AMPA, double g_NMDA, double g_GABA, double g_in);
public:
	Neuron();			// default constructor
	void step(double g_AMPA, double g_NMDA, double g_GABA, double g_in);
};



1
2
3
4
5
6
void Neuron::step(double g_AMPA, double g_NMDA, double g_GABA, double g_in) {
	if (EIF) 
		EIFstep(double g_AMPA, double g_NMDA, double g_GABA, double g_in);
	else if (HH) 
		HHstep(double g_AMPA, double g_NMDA, double g_GABA, double g_in);
}


EIF and HH are extern ints either 1 or 0.
When I compile this code I get error: Expected primary expression before 'double' on both the EIFstep and the HHstep line in the step() function definition. I'm not sure what's wrong because both functions are void, so shouldn't need anything besides a simple function call.
closed account (z05DSL3A)
1
2
3
4
5
6
void Neuron::step(double g_AMPA, double g_NMDA, double g_GABA, double g_in) {
	if (EIF) 
		EIFstep(g_AMPA, g_NMDA, g_GABA, g_in);
	else if (HH) 
		HHstep(g_AMPA, g_NMDA, g_GABA, g_in);
}
??
you dont need to specify the types when you call the function, Neuron::step() should look like this
1
2
3
4
5
6
void Neuron::step(double g_AMPA, double g_NMDA, double g_GABA, double g_in) {
	if (EIF) 
		EIFstep(g_AMPA, g_NMDA, g_GABA, g_in);
	else if (HH) 
		HHstep(g_AMPA, g_NMDA, g_GABA, g_in);
}
duhhhh. thank you.
Topic archived. No new replies allowed.