
c++
文章平均质量分 57
22233232
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
今天搞明白了内些传说中的硬件
技术这个东西真是要是不会,全都感觉难的不行不行的,但是要是会了,就会感觉很简单,没有难的技术,只有不会的技术。` class MyComm : public CnComm { public: MyComm() { CnComm(); dInput = -1.0;}bool bLock;void OnReceive(){ i原创 2015-11-16 14:46:41 · 458 阅读 · 0 评论 -
Binary Search and Euclid Algorithm
#includeusing namespace std;/*Performs the standard binary search using two comparisons per level.Returns index where item is found or -1 if not found.*/const int NOT_FOUND = -1;templa原创 2017-12-29 14:18:35 · 213 阅读 · 0 评论 -
有向图的邻接矩阵
所谓用邻接矩阵,是用一个二维数组存储,边使用矩阵来构建模型,这使得每一个顶点和其它顶点之间都有边的有无 的 表示的机会。若有边,则他们交点 为1 ,否则为0。当然,如果是一副边有权值的图,交点存储的是他们边的权值。 有1必有回1则为无向图,有1未必有回1则为有向图const int MAX_VERTEX = 3;//数据的数量struct ArrayGraph{ vector<strin原创 2017-11-29 17:11:42 · 17616 阅读 · 1 评论 -
Maximum Subsequence Sum Problem
Maximum Subsequence Sum Problem(最大的子序列问题) jGiven(possibly negative)integersA1,A2原创 2017-12-26 23:36:00 · 520 阅读 · 0 评论 -
C++复习swap and move
Swapping doubles is easily implemented with three copies, However, although the same logic works to swap larger types, it comes with a significant cost: Now the copies are very expensive. In C++11, if原创 2017-09-30 04:00:57 · 716 阅读 · 0 评论 -
c++复习Return Passing
In C++, there are several different mechanisms for returning from a function. The most straightforward mechanism to use is return-by-value.vectorpartialSum(const vector&arr){ vectorresult(arr.s原创 2017-09-30 01:57:35 · 251 阅读 · 0 评论 -
C+复习Parameter Passing
double average(double a, double b);//call-by-value;void swap(double &a,double &b);//call-by-reference. in C++11, this is more technically call-by-lvalue-reference.string randomItem(const vector&ar原创 2017-09-29 01:25:25 · 922 阅读 · 0 评论 -
C++复习Lvalues,Rvalues,References
An lvalue is an expression that identifies a non-temporary object. An rvalue is an expression that identifies a temporary object or is a value (such as a literal constant) not associated with any obje原创 2017-09-28 17:35:53 · 259 阅读 · 0 评论 -
C++复习Pointers
C++ details(Pointers)A pointer variable is a variable that stores the address where another object resides. It is the fundamental mechanism used in many data structures. For instance, to store a l原创 2017-09-28 14:14:55 · 310 阅读 · 0 评论 -
c++基础复习(vector string)
The C++ standard defines two classes: the vector and string. vector is intended to replace the built-in C++ array, which causes no end of troube. The problem with the built in C++ array is that it doe原创 2017-09-28 11:01:44 · 619 阅读 · 0 评论 -
如何在foreach中删除一个集合中的元素
如何在foreach中删除一个集合中的元素,其实很简单,只用一个递归就可以了,例如下面的一个代码判断一个listbox里面的items都是checkbox其中被选中的全部都删除 void removef() { foreach (CheckBox item in lst.Items) { i原创 2016-08-02 15:04:03 · 3676 阅读 · 1 评论 -
BinarySearchTree
#pragma once#include<algorithm>using namespace std;//BinarySearchTree class//construction: zero parameter///*void insert(x) -->Insert xvoid remove(x) -->Remove xbool contains(x...原创 2018-04-11 14:25:52 · 444 阅读 · 0 评论