内容:
说明:
结构体的基本使用
示例代码:
// Structs.cpp: 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
struct Student
{
int age;
string fName;
string lName;
int score;
};
//by zhaocl
int main()
{
Student st;
cin >> st.age >> st.fName >> st.lName >> st.score;
cout << st.age << endl;
cout << st.fName << endl;
cout << st.lName << endl;
cout << st.score << endl;
system( "pause" );
return 0;
}
知识点:
无~