biancheng
来源:互联网 发布:php砍价源码 编辑:程序博客网 时间:2024/06/18 06:04
#include "iostream.h"
class Complex
{
private:
float real;
float imaginary;
public:
Complex(float m,float n)
{real=m;imaginary=n;}
void output()
{
cout<<"实数部分为"<<real<<endl;
cout<<"虚数部分为"<<imaginary<<endl;
}
};
void main()
{
Complex a(34.6,12.1);
a.output();
}
class Complex
{
private:
float real;
float imaginary;
public:
Complex(float m,float n)
{real=m;imaginary=n;}
void output()
{
cout<<"实数部分为"<<real<<endl;
cout<<"虚数部分为"<<imaginary<<endl;
}
};
void main()
{
Complex a(34.6,12.1);
a.output();
}
- biancheng
- biancheng
- biancheng
- 保护成员 http://c.biancheng.net/cpp/biancheng/view/229.html
- C++虚析构函数 http://c.biancheng.net/cpp/biancheng/view/247.html
- C++派生类的构造函数 http://c.biancheng.net/cpp/biancheng/view/231.html
- shell学习-转自http://c.biancheng.net/cpp/shell/
- Linux-网桥原理分析 http://biancheng.dnbcw.info/linux/244269.html
- int open(const char * pathname, int flags); http://c.biancheng.net/cpp/html/238.html
- Shell特殊变量:Shell $0, $#, $*, $@, $?, $$和命令行参数 http://c.biancheng.net/cpp/view/2739.html
- 多线程中栈空间的分配 http://biancheng.dnbcw.info/linux/303270.html
- android开发技术文章荟萃【2011-11-8】
- ngxin 配置(二)
- socket例子
- ios(iphone/ipad)开发每日一练【2011-11-2】
- 对面向对象语言学习的理解
- biancheng
- 驱动开发中使用安全字符串函数
- arm 指令格式
- vb/vb.net开发精粹(14)
- smarty 模板
- 1 sybase简介
- 关于web对话窗口使用总结
- SQL SERVER 和EXCEL的数据导入导出
- chengxu