- 博客(12)
- 收藏
- 关注
原创 c++ Primer Plus(第六版)第十二章习题,写代码之路
c++ Primer Plus(习题12.1)//12.1头文件#pragma once#ifndef COW_H#define COW_H#include#includeclass Cow{private: char name[20]; char *hobby; double weight;public: Cow(); Cow(const char* nm, co
2017-01-20 13:01:53 1360
原创 c++ Primer Plus(第六版)第八章习题,写代码之路
c++ Primer Plus(习题8.1)/*题意看了好久才明白意思,即不依赖形参n,来输出字符串*//*个人见解,无*/#includeconst int TIMES = 10;int count = 0; //用一个全局变量,记录函数调用次数void show(const char *p, int n = 0);int main(){ using names
2017-01-20 11:56:33 558
原创 c++ Primer Plus(第六版)第七章习题,写代码之路
c++ Primer Plus(习题7.1)//用户输入啷个数,返回调和平均数//其中一个为0结束程序#includeusing namespace std;double t_average(double a, double b);int main(){ cout << "Please two interger: "; double x, y; while (cin >> x
2017-01-20 11:53:15 1272
原创 c++ Primer Plus(第六版)第九章编程练习之路
c++ Primer Plus(习题9.1)/*golf.h习题9.1头文件*/#pragma once#ifndef GOLF_H#define GOLF_H //习惯的用法const int Len = 40; //存储名字的长度//golf结构struct golf{ char fullname[Len]; int handic
2017-01-07 09:41:49 391
原创 c++primer plus 第4章编程练习之路
c++ Primer Plus(习题4.1)#includeconst int Lengh = 10;int main(){ using namespace std; cout << "what is your frist name? "; char fristname[Lengh]; cin.getline(fristname, Lengh); cout << "what i
2017-01-03 20:01:27 571 1
原创 c++primer plus 第六版 第2章 编程练习之路
//c++ Primer Plus(习题2.2)//input 以 long为单位的距离,将它转换成码.(1 long =220码)#includeconst float Yard = 220;int main(){using namespace std;cout> result;cout << result << "long change to Yard is " << result
2017-01-03 19:54:19 427
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人