
CodePudding user response:
Reference:# include & lt; stdio.h>
Struct stu {
Int fun (int a)
{
Printf (" I am fun! \n");
}
};
Int main ()
{
Struct stu a;
A.f UN (1);
}
CodePudding user response:
Didn't you this kind of writing, such as structure initialized again not specification, function structure, is actually a class. Its function is only belongs to the public.You can build a it in the main function object, with the object's member member function call, the struct stu a;
A.f UN (1);