You have granted friendship to the me function, which is fine. But it doesn't mean everything is a friend, so line 21 is an error.
Btw, the me function returns an int, but you don't do anything with it.
Your class needs a constructor with a member initialization list, so that the private variables are set with some values. That is the purpose of a constructor.
friendvoid setme(Stud d);
void setme(Stud d, int e)
They are two different functions, did you forget to add it to the friend parameters?
EDIT: By add it, I mean the int e parameter.
EDIT 2:
BTW this line here: setme(Stud c, 10);
You aren't using the previous Stud c you declared, you are creating an entirely new stud in the scope of the setme function. If you want to use the preveious Stud, reference it by name:
I don't think you should be using friend functions for these purposes.
Have a constructor set the member values initially. Have an ordinary public function: to return the value of a private member (aka a accessor function, get function); or to print a value; or overload the ostream << operator to print the values in the class. Have a public function to set the value of a member after the object is created - these are known as mutator or set functions.
Note that you don't necessarily have to have a get /set function for every member variable. Often one can combine them - one function to alter several variables.