码迷,mamicode.com
首页 >  
搜索关键字:c++ primer plus    ( 4591个结果
C++编程实践: 抽象基类
本实例来自《C++ Primer Plus》(第六版) 第十三章 题目要求:假设你正在开发一个图形程序,该程序会显示圆和椭圆等,需要考虑:椭圆要包含椭圆中心坐标,半长轴,半短轴以及方向角的数据。圆要实现圆心坐标,半径等数据。椭圆要包含移动,旋转一定角度,计算面积和缩放等方法,但是圆不需要旋转。设计思...
分类:编程语言   时间:2015-12-21 10:54:20    阅读次数:226
动态链接库中导出模板函数
动态链接库中导出模板函数C++ 支持函数模板,利用函数模板,可以简化我们的程序代码。我在自己的代码中也经常用到函数模板,但是以前一直以为函数模板是要放到头文件中的,否则调用模板函数时,编译器会找不到函数模板的定义。今天闲暇,又翻了翻 C++ Primer,发现我以前的理解是有问题的。模板函数也可以像普通函数那样,将声明放在头文件中,定义放在.cpp 中。这时又想到另一个问题,DLL 中是否可以导出模...
分类:其他好文   时间:2015-12-20 13:18:27    阅读次数:177
C++中的inline声明
C++中的inline声明1. inline函数(摘自C++ Primer的第三版) 在函数声明或定义中函数返回类型前加上关键字inline即把函数指定为内联函数。inline int min(int first, int secend) { /****/}; inline 函数对编译器...
分类:编程语言   时间:2015-12-19 23:11:07    阅读次数:219
HDU 1024 Max Sum Plus Plus
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1024Max Sum Plus PlusTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Tot...
分类:其他好文   时间:2015-12-18 21:26:18    阅读次数:265
C++编程实践: 继承与多态
本实例及代码来自《C++ Primer Plus》(第六版) 第十三章题目要求:假如你是某银行首席程序员。银行要求你开发两个类,一个用于表示基本支票账户——Brass Account,另一个用于表示代表Brass Plus支票账户,它添加了透支保护的特性。也就是说,如果持有此卡的用户签出了一张超出其...
分类:编程语言   时间:2015-12-17 22:34:45    阅读次数:445
【数组处理】66
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:编程语言   时间:2015-12-17 12:54:15    阅读次数:146
LeetCode 66:Plus One
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. //题意:一个整数按位存储于一个int数...
分类:其他好文   时间:2015-12-17 01:52:04    阅读次数:231
C++ 泛型算法
《C++ Primer 4th》读书笔记标准容器(the standard container)定义了很少的操作。标准库并没有为每种容器类型都定义实现这些操作的成员函数,而是定义了一组泛型算法:因为它们实现共同的操作,所以称之为“算法”;而“泛型”指的是它们可以操作在多种容器类型上——不但可作用于 ...
分类:编程语言   时间:2015-12-17 00:26:12    阅读次数:262
Linux中 groupadd 和 useradd 的命令说明
groupadd [options] group说明The groupadd command creates a new group account using the values specified on the command line plus the default values from...
分类:系统相关   时间:2015-12-16 19:36:32    阅读次数:1275
Plus One leetcode java
问题描述:Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit ...
分类:编程语言   时间:2015-12-16 17:03:48    阅读次数:151
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!