2.4
来源:互联网 发布:css源码 编辑:程序博客网 时间:2024/04/30 01:51
#include<string>
using namespace std;
class student
{
public:
void display();
int num;
string name;
char sex;
};
#include<iostream>
#include"student.h"
void student::display()
{
cout<<"num:"<<num<<endl;
cout<<"name:"<<name<<endl;
cout<<"sex:"<<sex<<endl;
}
//main.cpp
#include <iostream>
#include"student.h"
int main()
{
student stud;
cin>>stud.num>>stud.name>>stud.sex;
stud.display();
return 0;
}
using namespace std;
class student
{
public:
void display();
int num;
string name;
char sex;
};
#include<iostream>
#include"student.h"
void student::display()
{
cout<<"num:"<<num<<endl;
cout<<"name:"<<name<<endl;
cout<<"sex:"<<sex<<endl;
}
//main.cpp
#include <iostream>
#include"student.h"
int main()
{
student stud;
cin>>stud.num>>stud.name>>stud.sex;
stud.display();
return 0;
}
0 0
- 2.4
- 2.4
- 2.4
- 2.4
- 2.4
- 2.4
- 2.4
- 2.4
- HexAssistant 2.4
- 2.4 反义
- 2.4 网上银行
- 2.4-2
- task_struct-2.4
- hdu1.2.4
- CareerCup 2.4
- CareerCup-2.4
- 练习2.4
- 2.4 小结
- eclipse无法识别手机设备(本人是小米3)
- 漫谈程序员系列:神奇的四步编程法
- 2.3
- 人的一生要疯狂一次,无论是为一个人,一段情,或一个梦想
- unity3d 关于断点下载和整个下载(用于更新)
- 2.4
- C学习if条件判断和for循环
- Python简易爬虫以及嵌套数据类型
- 第五周项目一——体验常成员函数(2)
- 2.5
- MRC下安全的Block
- 2.6
- 数学基础:矩阵
- Android 开发环境配置