// by 鸟哥 qq1833183060 struct和函数同名
#include <iostream>
using std::cout;
struct a{
int i=9;
};
void a(){
cout<<"in a."<<std::endl;
}
int main()
{
struct a st;
cout<<st.i<<std::endl;
a();
}
//输出为 9
// in a.
运行结果:
9
in a.
来源:CSDN
作者:鸟哥01
链接:https://blog.csdn.net/sinat_18811413/article/details/104142732