- 博客(9)
- 资源 (7)
- 收藏
- 关注
转载 详细解说STL string
0 前言: string 的角色 1 string 使用 1.1 充分使用string 操作符 1.2 眼花缭乱的string find 函数 1.3 string insert, replace, erase 2 string 和 C风格字符串 3 string 和 Charactor Traits 4 string 建议 5 小结 6 附录 7 参考文章0 前言: string
2007-08-31 04:27:00 1650 1
原创 筛法求素数+分解质因子+欧拉函数+求约数
bool prime[31700]; // 31700*31700 > 1000000000int primes[3500];int cnt=0; // 筛法求素数void sieve()...{ memset(prime, 1, sizeof(prime)); prime[0]=false; prime[1]=false; int m=31700;
2007-08-26 21:43:00 3367 2
转载 详细解说STL hash_map系列
原文:http://www.stlchina.org/twiki/bin/view.pl/Main/STLDetailHashMap 为什么需要hash_map用过map吧?map提供一个很常用的功能,那就是提供key-value的存储和查找功能。例如,我要记录一个人名和相应的存储,而且随时增加,要快速查找和修改: 岳不群-华山
2007-08-24 02:27:00 1694
原创 vc++2005 和 g++中使用hash_map
hash_map不在C++98/2003标准中,因此在VC++2005和g++中使用的方法略有区别。【1】VC++2005#include hash_map> // 注意头文件和namespaceusing namespace stdext; int main()...{ hash_mapstring, int> hmap; return 0;}【2】g++#i
2007-08-24 02:04:00 2661
转载 Power up C++ with STL: Part IV (Implementing real algorithms)
I strongly recommend you to read the three articles below first.Power up C++ with STL: Part I (introduction, vector)Power up C++ with STL: Part II (string, set, map)Power up C++ with STL: Part III (m
2007-08-20 03:43:00 2800 1
转载 Power up C++ with STL: Part III (more on STL)
I strongly recommend you to read the two articles below first.Power up C++ with STL: Part I (introduction, vector) Power up C++ with STL: Part II (string, set, map)Creating Vector from Map As you alr
2007-08-20 03:32:00 1632
转载 Power up C++ with STL: Part II (string, set, map)
See Power up C++ with STL: Part I (introduction && vector) String There is a special container to manipulate with strings. The string container has a few differences from vector. Most of the differenc
2007-08-18 16:15:00 2376
转载 Power up C++ with STL: Part I (introduction, vector)
Perhaps you are already using C++ as your main programming language to solve TopCoder problems. This means that you have already used STL in a simple way, because arrays and strings are passed to your
2007-08-18 02:43:00 3885
原创 C++ BigInteger (beta version)
#include deque>#include #include #include #include using namespace std;class DividedByZeroException ...{};class BigInteger...{ private: vectorchar> digits; bool sign; //
2007-08-11 13:49:00 8805 2
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人