常用方法vector1、可随机访问,可在尾部插入元素;2、内存自动管理;3、头文件#include 1、创建vector对象一维:(1) vectorv1;(2) vectorv2(10);//10个元素,初始为0(3) vectorv3(10,4);//10个元素,初始为4(4) vectorv4...
分类:
其他好文 时间:
2014-09-01 19:19:43
阅读次数:
313
和 Uva 10020几乎是一样的,不过这里要把圆形区域转化为能够覆盖的长条形区域(一个小小的勾股定理)学习一下别人的代码,练习使用STL的vector容器这里有个小技巧,用一个微小量EPS来弥补浮点运算中的误差 1 //#define LOCAL 2 #include 3 #include 4.....
分类:
其他好文 时间:
2014-09-01 19:15:03
阅读次数:
262
function template
std::any_of
template
bool any_of (InputIterator first, InputIterator last, UnaryPredicate pred);
Test if any element in range fulfills condition
Returns true if pr...
分类:
其他好文 时间:
2014-09-01 17:42:13
阅读次数:
285
[原创]VS2010中创建动态链接库及其调用一、创建动态链接库在VS2010中创建动态链接库的步骤如下:1)生成->编译->生成MyDll二、调用当调用DLL中的方法,程序编译产生LNK2019问题的时候,需要将MyDll.lib和MyDll.dll拷贝到当前工程的debug文件加下,然后加上#pr...
分类:
其他好文 时间:
2014-09-01 17:10:13
阅读次数:
196
今天在写JS时,写到500多行时,感觉代码已经很难看了。想到C#代码都有折叠功能,是不是JS也有呢。在选项中找了一下,没有相关了的设置功能,于是就上网找。一找可就不得了,发现了好多好用的插件。都可以在Visual Studio 的MSDN上找到。网址为:http://visualstudiogall...
分类:
编程语言 时间:
2014-09-01 17:09:53
阅读次数:
192
STL的容器可以分为以下几个大类:一:序列容器, 有vector, list, deque, string.二 : 关联容器, 有set, multiset, map, mulmap, hash_set, hash_map, hash_multiset, hash_multimap三: 其他的杂项:...
分类:
其他好文 时间:
2014-09-01 15:14:03
阅读次数:
170
1.首先从http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/1.2.1p1/mpich2-1.2.1p1-win-ia32.msi下载并安装MPICH2。2.安装完成后,打开“开始-所有程序-MPICH-wmpire...
分类:
其他好文 时间:
2014-09-01 10:44:22
阅读次数:
339
1find查找
#include
#include
#include
#include
#include
#include
using
namespace
std;
void
main()
{
vectorint>
myv;
myv.push_bac...
分类:
其他好文 时间:
2014-08-31 22:57:32
阅读次数:
286
以下内容是转载的:http://stlchina.huhoo.net/bin/view.pl/Main/STLDetailHashMap详细解说STL hash_map系列详细解说STL hash_map系列0 为什么需要hash_map1 数据结构:hash_map原理2 hash_map 使用2...
分类:
编程语言 时间:
2014-08-31 21:19:51
阅读次数:
397