各知识点1
来源:互联网 发布:mac 如何编写html 编辑:程序博客网 时间:2024/05/16 09:35
#include <iostream>
#include <string>
using namespace std;
class Person
{
public :
virtual void say()
{
cout << "I am a man."<<endl;
}
virtual void unknown1() = 0;
};
class Programer:public Person
{
private :
string name;
int number;
int age;
public:
Programer()
{
name = " ";
number = 0;
age = 0;
}
Programer(string p,int q,int r)
{
name = p;
number = q;
age = r;
}
int f_compute(int a,int b);
int setAge() const;
void unknown1();
void print()
{
cout << name <<" "<<number <<" "<< age << endl;
}
virtual void say()
{
cout << " I am a programer! " <<endl;
}
int birthyear(int age)
{
// age = 2014 - this->age;
age = 2014 - age;
cout << "my birthyear is " << age <<endl;
return 0;
}
};
#include <string>
using namespace std;
class Person
{
public :
virtual void say()
{
cout << "I am a man."<<endl;
}
virtual void unknown1() = 0;
};
class Programer:public Person
{
private :
string name;
int number;
int age;
public:
Programer()
{
name = " ";
number = 0;
age = 0;
}
Programer(string p,int q,int r)
{
name = p;
number = q;
age = r;
}
int f_compute(int a,int b);
int setAge() const;
void unknown1();
void print()
{
cout << name <<" "<<number <<" "<< age << endl;
}
virtual void say()
{
cout << " I am a programer! " <<endl;
}
int birthyear(int age)
{
// age = 2014 - this->age;
age = 2014 - age;
cout << "my birthyear is " << age <<endl;
return 0;
}
};
0 0
- 各知识点1
- 知识点1
- 知识点1
- android知识点整理1(知识点框架图)
- 各知识点2
- C++各知识点
- Redux各知识点介绍
- c#知识点(1)
- JAVA 常用知识点1
- C#知识点1-类集
- C/C++知识点1
- VC知识点1
- VC知识点1
- flex知识点1
- 零碎知识点1
- C++知识点总结(1)
- 知识点记录1
- Hcse 交换知识点-1
- 重温Java知识(三)
- 一步一步教你做提示框--傻瓜也能学会
- apache开启gzip的方法
- eclipse无法访问genymotion模拟器下/data/data文件解决方案
- 无线传输杂叙二
- 各知识点1
- 建造者模式的设计
- windows - 进程 - 进程环境变量
- eclipse3.4 插件安装
- 远程连接mysql出现错误不允许当前IP访问
- NSNotificationCenter以及app的几种运行状态
- 谁说Vim不是IDE?(三)
- MemCached_wiki
- js判断鼠标移动方向