![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c/c++ program
文章平均质量分 81
阿卜杜拉大喵
夫英雄者,胸怀大志,腹有良策,有包藏宇宙之机,吞吐天地之志也
展开
-
c++ primer plus第三章习题答案
先给出第三章习题的程序,注释还是暂缓程序在visual studio下编译,正常运行。如有问题请不吝赐教第一题#include #include #include #include #include using namespace std;#define NUM_HEIGHT 10void Input(int & num, int & cou原创 2014-11-25 20:19:18 · 371 阅读 · 0 评论 -
c++ primer plus第十章习题答案
先给1-4题,5-8后来补上第一题count.h//***************************************************************************************////*****************************************count.h************************原创 2014-12-10 19:42:55 · 714 阅读 · 0 评论 -
c++ primer plus第十一章习题答案
第一题// vect.h -- Vector class with <<, mode state#ifndef VECTOR_H_#define VECTOR_H_#include #include using std::sqrt;using std::atan2;using std::cos;using std::sin;namespace VECTOR{ cla原创 2014-12-30 11:39:51 · 1043 阅读 · 0 评论 -
c++ primer plus第九章习题答案
直接上源码:第一题golf.h//*****************************************************************////*******************************golf.h****************************//// golf.h -- for pe9-1.cpp#ifndef GOLF原创 2014-11-30 13:27:25 · 722 阅读 · 0 评论 -
c++ primer plus第四章习题答案
这章的内容不错,字符串结构体共用体枚举指针数组,编程的最基本类型基本都有涉及字符串操作比较易错且知识易忘,各位要注意了结构体共用体会与以后的内存对齐有关,这个就是寻址和存储上的事了指针就是地址,老师多次强调,各位不妨一记给代码!!第一题#include #include using namespace std;int main(){strin原创 2014-11-25 20:21:35 · 414 阅读 · 0 评论 -
c++ primer plus第七章习题答案
先上源码,过几天要考试,考完后总结第一题#include using namespace std;double Calculate(double x, double y);int main(){double a, b;double avr;cout cin >> a >> b;while(a!=0 && b!=0){avr原创 2014-11-25 20:59:49 · 441 阅读 · 0 评论 -
c++ primer plus第五章习题答案
循环是一个简单的事,但要明白for循环的执行原理:初始化->测试表达式?->进入函数体->更新表达式->测试表达式?……for和while循环都是先判断条件再执行,do-while是先执行再判断条件,应该视情况不同而选择代码如下,注释稍后再补:第一题#include using namespace std;int main(){int a, b;原创 2014-11-25 20:38:13 · 392 阅读 · 0 评论 -
c++ primer plus第二章习题答案(原创请参考)
第一题#include //using namespace std;int main(){using std::cout;using std::endl;cout cout return 0;}原创 2014-11-25 12:54:45 · 530 阅读 · 0 评论 -
c++ primer plus第八章习题答案
这章讲引用、模版和重载第一题/*这道题什么意思?第二个值为零或空,只打印一次;第二个值非零时,调用第一次,打印一次字符串;调用第二次,打印两次字符串以此类推*/#include using namespace std;void Print(const char * pt, int n = 0);int main(){char wo原创 2014-11-25 21:07:02 · 481 阅读 · 0 评论 -
c++ primer plus第六章习题答案
直接上代码:第一题#include #include using namespace std;int main(){char flag;do{cin >> flag;if(flag >= 97 && flag {flag = flag - 32;cout }else if(flag >= 65 && flag原创 2014-11-25 20:53:31 · 548 阅读 · 0 评论 -
Windows下的串口类及功能实现
今儿看了几篇硕士论文,又看到了有人在用MSComm控件编的串口。当时我就不太懂这玩意儿是怎么用的,其实是因为在MFC(visual studio 2013环境)里怎么找也找不到这个控件。。。好吧,偷懒不成只好自己编一个串口类来实现功能了。参考了很多文献和CSDN上的前辈的程序,最后编了一个小玩意儿,虽然不大,但是设置、收发、等待和其他一些功能也是完备了。直接上代码吧,以供后来人参考,回报社原创 2016-03-17 00:38:55 · 3304 阅读 · 2 评论