随笔分类 -  Lang__C++

programming language
摘要:在31年前(1979年),一名刚获得博士学位的研究员,为了开发一个软件项目发明了一门新编程语言,该研究员名为Bjarne Stroustrup,该门语言则命名为——C with classes,四年后改称为C++。C++是一门通用编程语言,支持多种编程范式,包括过程式、面向对象(object-ori 阅读全文
posted @ 2018-08-31 23:08 kimsimple 阅读(230) 评论(0) 推荐(0)
摘要:from https://www.cnblogs.com/charlesblc/p/5703557.html 阅读全文
posted @ 2018-08-31 23:05 kimsimple 阅读(572) 评论(0) 推荐(0)
摘要:1.未初始化 指针未初始化为NULL,造成判断条件出错 数值未初始化为0,造成数组超界,内存泄漏 2. long long输入时 lld or I64d 写成d一定出错 3.gcc编译报错:程序中有游离的‘\357’‘\273’‘\277’等 感谢http://www.cnblogs.com/lid 阅读全文
posted @ 2018-03-30 10:53 kimsimple 阅读(301) 评论(0) 推荐(0)
摘要:Windows下C++Socket编程,调用WSAStartup函数报错:undefined reference to `WSAStartup@8'| 本人使用的是Codeblocks MinGW MinGW 提供了一套简单方便的Windows下的基于GCC 程序开发环境。MinGW 收集了一系列免 阅读全文
posted @ 2017-10-24 00:03 kimsimple 阅读(5647) 评论(1) 推荐(2)
摘要:其他类型转字符串 itoa 功 能:把一整数转换为字符串用 法:char *itoa(int value, char *string, int radix);详细解释:itoa是英文integer to array(将int整型数转化为一个字符串,并将值保存在数组string中)的缩写.其中valu 阅读全文
posted @ 2017-05-31 10:04 kimsimple 阅读(776) 评论(0) 推荐(0)
摘要:#include #include #include #include #include using namespace std; int main() { int T, m; cin >> T; while(T--) { map >mp; string place, name; int num; ... 阅读全文
posted @ 2017-05-21 23:35 kimsimple 阅读(335) 评论(0) 推荐(0)
摘要:set set关联式容器。set作为一个容器也是用来存储同一数据类型的数据类型,并且能从一个数据集合中取出数据,在set中每个元素的值都唯一,而且系统能根据元素的值自动进行排序。应该注意的是set中数元素的值不能直接被改变。C++ STL中标准关联容器set, multiset, map, mult 阅读全文
posted @ 2017-04-08 17:51 kimsimple 阅读(215) 评论(0) 推荐(0)
摘要:转自c++ 如何批量初始化数组 fill和fill_n函数的应用 一、 fill和fill_n函数的应用: fill函数的作用是:将一个区间的元素都赋予val值。 函数参数:fill(first,last,val);//first为容器的首迭代器,last为容器的尾迭代器, 替换元素的区间为[fir 阅读全文
posted @ 2017-04-03 09:37 kimsimple 阅读(2962) 评论(0) 推荐(0)
摘要:全面: http://blog.jobbole.com/106992/ http://blog.sciencenet.cn/blog-411071-839543.html http://panpan.blog.51cto.com/489034/101625 http://c.biancheng.ne 阅读全文
posted @ 2017-03-15 17:58 kimsimple
摘要:1 #include "iostream" 2 #include "iomanip" 3 #include "cstdio" 4 using namespace std; 5 int main() 6 { 7 ///Type conversion and casts 类型的转换和强转 8 ///char>c;///默认cin忽略空白字符 25 ///需要从... 阅读全文
posted @ 2016-12-02 12:36 kimsimple 阅读(355) 评论(0) 推荐(0)
摘要:1 //STL基础 2 //容器 3 //vector 4 5 #include "iostream" 6 #include "cstdio" 7 #include "vector"//向量 8 #include "iterator"//迭代器 9 #include "numeric"//accun 阅读全文
posted @ 2016-07-13 17:50 kimsimple 阅读(215) 评论(0) 推荐(0)