Visual Studio compiling error C4430

Hi guys,
This is a code(a class' method which I implement in my .cpp file):

1
2
3
4
 
Passenger::getPassengerId(){
	return passengerId;
}


The class is called Passenger and it has long int passengerID field which is a private field.
I want this function to do one thing which is just returning the passenger's ID,
but I get these errors:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

error C2511: 'int Passenger::getPassengerId(void)' : overloaded member function not found in 'Passenger'

How can I solve these errors?
Thanks guys!
You've missed the return type.

1
2
3
4
long int Passenger::getPassengerId()
{
   return passengerId;
}
Topic archived. No new replies allowed.