阅读背景:

C++之结构体的另类使用

来源:互联网 

此程序模仿MFC中的消息映射方法而写

#include<iostream>
using namespace std;
struct node
{
	int x;
	double y;
};
void main()
{
	struct node _node[]=
	{
		5,5.0,
	    8,8.0,
		9,9.0
	};
	int n=sizeof(_node)/sizeof(_node[0]);
	for(int i=0;i<n;i++)
	{
		cout<<_node[i].x<<_node[i].y<<endl;
	}
}
#include<iostream>
usin



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: