《C++ Primer Plus》学习笔记6
第11章 使用类
1、操作符的重载
将两个数组相加是一个常见的运算,可以使用下面的for循环来实现
for(int i = 0; i 20; i++)
evening[i] = sam[i] + janet[i];//每个元素每个元素相加
在C++中可以定义一个表示数组的类,并重载+操作符
evening = sam...
分类:
编程语言 时间:
2014-07-22 22:48:53
阅读次数:
320
《设计模式》这6大原则,自己总结了下: 设计模式6大原则: 1 开闭原则 a 定义:对拓展打开,对修改关闭 b 理解: - 通常表现为switch语句。这样的语句在新的需求增加后,必然要新增一个case,可以改变设计,以实现...
分类:
其他好文 时间:
2014-07-22 09:00:04
阅读次数:
180
The trick is, we can work on a reversed vector - learnt from EPI.class Solution {public: vector plusOne(vector &digits) { std::reverse(digit...
分类:
其他好文 时间:
2014-07-22 00:33:36
阅读次数:
223
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace C_编辑基础{ //枚举的意义就是限定变量的取值范围 enum gender{Male,Female,...
分类:
其他好文 时间:
2014-07-22 00:32:36
阅读次数:
172
进制转换
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 24133 Accepted Submission(s): 13519
Problem Description
输入一个十进制数N,将它转换成R进制数...
分类:
其他好文 时间:
2014-07-21 11:47:15
阅读次数:
242
How to Set or Switch Oracle Homes on Windows (Doc ID 969581.1)...
分类:
数据库 时间:
2014-07-21 11:37:55
阅读次数:
171
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...
分类:
其他好文 时间:
2014-07-21 10:00:12
阅读次数:
185
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...
分类:
其他好文 时间:
2014-07-21 09:14:10
阅读次数:
168
Java中的switch语句后面的控制表达式的数据类型
1、byte
2、char
3、short
4、int
5、枚举类型
6、Java 7允许java.lang.String类型...
分类:
编程语言 时间:
2014-07-20 10:47:28
阅读次数:
389
在Android中需要有内核驱动向用户空间表露其状态,一般是使用switch类。本文没有详细去说明switch实现细节,以实用的角度给出了一个完整的例子。以ldd3中最简单的Hello World驱动模块为基础上简单实现了一个switch,可以方便快速上手。...
分类:
移动开发 时间:
2014-07-19 18:46:19
阅读次数:
390