The Reasons and methods for my Google search are as follows:
Http://blog.csdn.net/SkyIsland/archive/2006/04/15/664716.aspx
Cause: one of them is that the access level of the returned parameter is lower than the access level of the function,
What should I do?
That is, when defining a method for returning parameters, if the access level of the returned parameters is lower than the access level of the method, this error will occur. From Oo, this is understandable, if the returned parameters cannot be accessed, the returned method is incorrectly defined.
When defining the return parameter method, the returned parameter access level must be greater than or equal to the method access level.
Protected user getuserbyid (INT userid)
{
User u = NULL;
// Some create user
Return U;
}
Private class user
{
Private int _ userid;
Public user (INT userid)
{
_ Userid = userid;
}
}
If the code above is not compiled by the compiler, the reason is that the accessibility of the return parameter is lower than that of the return parameter method.