撞错2
来源:互联网 发布:淘宝网中老年唐装 编辑:程序博客网 时间:2024/06/04 17:59
/** 程序的版权和版本声明部分* Copyright (c)2013, 烟台大学计算机学院学生* All rightsreserved.* 文件名称: date.cpp* 作 者:* 完成日期:2013 年 3 月 15 日* 版本号: v1.0* 输入描述:* 问题描述:* 输出:*/#include <iostream>using namespace std;class Student{private:int num;char name[20]; char sex; void set_data(int n, char *p,char s){num=n; strcpy(name,p);sex=s;}public:void display( ) {cout<<"num: "<<num<<endl;cout<<"name: " <<name<<endl; cout<<"sex: " <<sex<<endl; } };int main(){Student stud1,stud2; stud1.set_data("ha","He",'f');stud2.set_data(2,"She",'m');stud1.display();stud2.display();return 0; }
运行结果:
- 撞错2
- 撞错
- 撞错
- 撞错
- 撞错
- “撞错”
- 撞错
- 撞错
- 撞错
- 撞错
- 撞错
- 撞错
- 撞错
- 撞错
- 撞错
- 学会“撞错”
- 撞错!!!!!改错!!!!!
- “撞错”体验
- 建立Sharepoint 2010开发环境
- android自定义控件(五) 自定义组合控件
- 对象(二)
- 关于正则的常识
- 64位Eclipse运行时提示“Failed to load the JNI shared library /Java/jre6/bin/client/jvm.dll”的一个解决方案
- 撞错2
- Hbase shell
- android自定义控件(六) 刷新
- 系统优化【1】---web前端
- 修旱冰场、
- Cocos2d基础及基本函数
- VB.NET 设置Label字体
- java设计模式之原型模式
- 用户名、密码、复选框,全选各种验证