搜索资源列表
C++程序设计语言实验三
- 实验三:C++编程入门 一、实验内容 1. 类模版。 2. 运算符重载。 3. 友元。 4. 继承。 二、实验题目 1, 设计一个类SavingsAccount,定义一个静态数据成员记录存款的年利率(rate),该类的每个成员都包含一个私有的数据成员balance,表示该成员当前的存款数额。提供一个成员函数CalMonthlyInterest(),用以计算月利息(用balance乘以rate再除以12),并将这个月利息加入balance中。提供一个静态成员函数ModifyRate(
debugmalloc
- #include <stdlib.h> #include <string.h> #include <stdio.h> //#include <iostream> #include "debugmalloc.h" #include "dmhelper.h" /*Define the macro */ #define ALIGN 8 #define FENCE 0xDEADBEEF #define HE
Hanoi(gray)
- //使用gray code的解法 #include <iostream> #include <cmath> using namespace std #define ZERO 0 #define ONE 1 #define ODD 1 #define EVEN 0 #define RIGHT 1 #define LEFT 0 #define MAX 10-//Gray code to use the method#
C++_INPUT_OUTPUT[iostream]
- C++ INPUT_OUTPUT using iostream in console application
triangle
- This a small program I think beginners would greatly benefit from. It offers loops and uses another library besides iostream. It is also quite amusing at times to play with.-This is a small program I think beginners would greatly benefit from. It o
goods
- #include <iostream> #include <string> using namespace std class Goods {public: Goods(char *GoodsNum,string n,double p,int a) { strcpy(GoodsNumber,GoodsNum) GoodsName=n GoodsPrice=p GoodsAmount=a }
c-P-P-lexical-analysis
- c++词法分析很简单的代码#include<iostream.h> #include<fstream.h> #include<stdlib.h> #include<stdio.h> #include<string.h> #include<conio.h> #include<process.h> /*头文件*/ -c++ lexical analysis is very simple c
datastruct
- 通过反序输出整数,实现了一个整数的反序输出。很好的实现了反序功能。-#include<iostream> using namespace std int main() {int a,b=0 cout<<"please input the integer:"<<endl cin>>a while(a) {b=b*10+a 10 a/=10 } cout<<"the end is"<<
ConColors_VC6_Demo
- 标准C + +的iostream库的颜色不知道。因此,控制台应用程序往往显得很枯燥,往往不能强调的重要文本洪水位。正如我通常使用控制台应用程序做单元测试,我想输入的测试案例中脱颖而出的条件和结果,并很容易解释(即通过绿色和失败红色)。 -The standard C++ iostream library does not know about colors. Hence, console applications tend to look very boring and often fail
choose
- 用c++编写的选票系统,并可统计相关得票情况-#include <iostream> using namespace std struct Person//声明结构体类型Person; { char name[20] int count } int main() { Person leader[3]={"aaa",0,"bbb",0,"ccc",0} //定义Person类型的数组,内容为当前候选人的姓名及得票数;
SortedSet
- 定义类模板SortedSet,即元素有序的集合,集合元素的类型 和集合元素的最大个数可由使用者确定。要求该类模板对外提供 以下三种操作: insert:加入一个新的元素到合适的位置上,并保证集合元 素的值不重复; get:返回比给定值大的最小元素的地址。若不存在,返回0; del:删除与给定值相等的那个元素,并保持剩余元素的有序性。 -#include <iostream> using namespace std template <c
wordchose
- 进行自负的匹配,- #include<iostream.h> #include <string> using namespace std class String { private: int size char *chr public: String(char* temp) { size=strlen(temp)
lab2
- 将华氏温度转化为摄氏温度,用C++语言实现,-#include<iostream> using namespace std double convert(double f) { double c c=(f-32)*5/9 return c } void main() { double f,c cout<<"请输入一个华氏温度:" cin>>f c=convert(f) co
lab1
- Practice programs using iostream
test
- 只是简单的Hello World小程序,用于初学者,运用了iostream库文件-Just a simple Hello World applet for beginners, using the iostream library files
Nnext
- c++实现N后问题——算法分析 #include<iostream> #include "math.h"-After the realization of N c++ problems- algorithm analysis
Employee
- C++简单实现雇佣问题 #include<iostream.h> #include<stdio.h> #include<string.h>-C++ is simple to achieve employment issues #include<iostream.h> #include<stdio.h> #include<string.h>
11.doc.ZIP
- 掌握标准输入输出(iostream库中标准对象cin、cout)的使用 掌握IO流类成员函数输入输出(cin.get, cin.getline, cin.read cout.put, cout.write)的使用 掌握输出格式(标准控制符、IO流类成员函数、iomanip头文件中的控制符)控制方法 掌握磁盘文件的输入输出方法-Master the standard input and output (iostream library standard objects cin, cou
iostream.h
- 库函数实现输入输出功能的函数库,属于C++类-libarary code
Huffman-codec
- 哈夫曼编译码器#include<iostream.h>//该程序实验哈夫曼树的建立、编码、译码三个基本功能 #include<stdio.h> #include<stdlib.h> #include<string.h> #include<fstream.h> typedef struct{ //结构体-Huffman codec