第2章第4题
来源:互联网 发布:java架构师证 编辑:程序博客网 时间:2024/06/10 12:36
C++
#include <iostream>#include "student.h"/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char** argv) {student s1;s1.set_value();s1.display();return 0;}
#include "student.h"
<pre name="code" class="cpp">#include <iostream>using namespace std;void student::display(){cout<<"num="<<num<<endl;cout<<"name="<<name<<endl;cout<<"sex="<<sex<<endl;}void student::set_value(){cin>>num;cin>>name;cin>>sex;}
#ifndef STUDENT_H#define STUDENT_Hclass student{private:int num;string name;char sex;public:void display();void set_value();};#endif
0 0
- 第2章第4题
- 第2章 第4题
- 第4章 第2题
- 第4章 第4题
- 第2章第2题
- 第2章 第2题
- 第3章 第4题
- 第4章 第1题
- 第4章 第3题
- 第4章 第5题
- 第4章 第6题
- 第4章 第7题
- 第5章第4题
- 第7章第4题
- 第7章 第4题
- 第10章第4题
- 第2章第3题
- 第2章第5题
- 传感器
- 第2章第3题
- codeforces 525C Ilya and Sticks(简单贪心)
- CSS文本溢出省略号:text-overflow:ellipsis及firefox兼容详解
- 联系人存储
- 第2章第4题
- LeetCode(30) Substring with Concatenation of All Words (java)
- CSS省略号text-overflow超出溢出显示省略号
- LeetCode(31) Next Permutation
- 多任务
- 第2章第5题
- ddpush 学习之路 13 Receiver.java
- 应用间通信
- 第2章第6题