莫名其妙的数据结构学习过程

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a973893384/article/details/7927633
#include "stdafx.h"
#include "windows.h"
#include "string"
#include "iostream"


using namespace std;


struct Student
{
	int num;
	string name;
	int age;
};


int main(int argc,char *argv)
{
	Student sid = {00010,"wangzhanzhi",18};
	Student * prt;
	prt = &sid;
	prt -> num = 10101;
	prt -> name = "wang";
	prt -> age = 17;
	cout<<prt->age<<endl<<prt->name<<endl<<prt->num<<endl;
	system("pause");
	return 0;
}


猜你喜欢

转载自blog.csdn.net/a973893384/article/details/7927633