摘要:C++IO类&文件输入输出 作者:tongqingliu 转载请注明出处:http://www.cnblogs.com/liutongqing/p/7072878.html 1. istream(输入流)类型,提供输入操作。 2. ostream(输出流)类型,提供输出操作。 3. cin,一个is
阅读全文
摘要:C++顺序容器之list初探 双向链表,支持双向顺序访问。在list中任何位置进行插入和删除速度都很快。 list不支持随机访问,为了访问一个元素,必须遍历整个容器。 cpp include include include using namespace std; void printList(co
阅读全文
摘要:C++顺序容器之deque初探 deque是双端队列,与vector非常相似,是顺序容器,不同的是,deque可以在数组开头和末尾插入和删除数据。支持快速随机访问。 cpp include include include using namespace std; int main() { deque
阅读全文
摘要:LeetCode 1.TwoSum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each i
阅读全文
摘要:C++标准库string 定义和初始化 | string s1 | 默认初始化,s1是一个空串 | | | | | string s2(s1) | s2是s1的副本 | | string s2 = s1 | 等价于s2(s1),s2是s1的副本 | | string s3("value") | s3
阅读全文
摘要:C++基本内置类型 基本内置类型包括 算术类型 和 空类型 。 算术类型 算术类型包括 整型 和 浮点型 。 | 类型 | 含义 | 最小尺寸 | | | | | | bool | 布尔型 | | | char | 字符型 | 8 bit | | wchar_t | 宽字符型 | 16 bit |
阅读全文
摘要:C++获取数组的长度 c include using namespace std; template int length(T& arr) { //cout
阅读全文
摘要:作者:tongqingliu 转载请注明出处:http://www.cnblogs.com/liutongqing/p/7069091.html Ubuntu下安装并配置VS Code编译C++ 网上看了很多教程,写的都不细致,或者我理解不够透彻,一步一步操作下来,总是错误百出。好不容易成功一次,现
阅读全文