2020年6月2日

C/C++ STL之 #include <cstdlib>头文件

摘要: 在进行编程时,有时需要用到头文件cstdlib中的方法,cstdlib中方法有如下类型: <1> 字符串转换 atof: 字符串转浮点型;atoi:字符串转整型;atol:字符串转长整型 #include <stdio.h> #include <stdlib.h> int main () { cha 阅读全文

posted @ 2020-06-02 15:34 天池怪侠 阅读(2109) 评论(0) 推荐(0) 编辑

C/C++ STL之 #include <cstdio>头文件

摘要: 头文件cstdio/stdio.h是C/C++使用最频繁的文件,因为文件中包含很多常用的方法,如下所示: <1> 文件操作 remove #include <stdio.h> int main () { if( remove( "myfile.txt" ) != 0 ) perror( "Error 阅读全文

posted @ 2020-06-02 15:30 天池怪侠 阅读(1664) 评论(0) 推荐(1) 编辑

C/C++ STL之 #include <complex>头文件

摘要: #include <complex> 阅读全文

posted @ 2020-06-02 15:25 天池怪侠 阅读(831) 评论(0) 推荐(0) 编辑

C++ STL之 #include <math>头文件

摘要: C++ 头文件math中包含数学中常用的函数,其中包括: <1> 三角函数 cos, sin, tan #include <stdio.h> #include <math.h> #define PI 3.14159265 int main () { double degrees, cos_resul 阅读全文

posted @ 2020-06-02 15:08 天池怪侠 阅读(2551) 评论(0) 推荐(1) 编辑

C++ STL之 #include <hash_map>头文件

摘要: #include <hash_map> 阅读全文

posted @ 2020-06-02 15:06 天池怪侠 阅读(864) 评论(0) 推荐(1) 编辑

C++ STL之 #include <vector>头文件

摘要: vector是C++标准库容器,其详细用途可参见如下网址: http://www.cplusplus.com/reference/vector/vector/ 阅读全文

posted @ 2020-06-02 15:04 天池怪侠 阅读(2796) 评论(0) 推荐(1) 编辑

C++ STL之 #include <string>头文件

摘要: 在字符串头文件string下有很多常用的方法,主要包括: <1> 复制 (1) memcpy 函数原型 void * memcpy ( void * destination, const void * source, size_t num ); 参数 destination: 目标字符串 sourc 阅读全文

posted @ 2020-06-02 15:02 天池怪侠 阅读(3603) 评论(0) 推荐(0) 编辑

C++ STL之 #include <stack>头文件

摘要: 栈是C++标准库容器之一,其详细用途可参见如下网址: http://www.cplusplus.com/reference/stack/stack/ 阅读全文

posted @ 2020-06-02 14:59 天池怪侠 阅读(1401) 评论(0) 推荐(0) 编辑

C++ STL之 #include <set>头文件

摘要: 集合是C++标准库容器之一,其详细用途可参见如下网址: http://www.cplusplus.com/reference/list/list/ 阅读全文

posted @ 2020-06-02 14:56 天池怪侠 阅读(1028) 评论(0) 推荐(0) 编辑

C++ STL之 #include <queue>头文件

摘要: 队列是C++标准库容器之一,其详细用途可参见如下网址: http://www.cplusplus.com/reference/queue/queue/ 阅读全文

posted @ 2020-06-02 14:55 天池怪侠 阅读(868) 评论(0) 推荐(0) 编辑

C++ STL之 #include <list>头文件

摘要: 列表是C++标准库容器之一,其详细用途可参见如下网址: http://www.cplusplus.com/reference/list/list/ 阅读全文

posted @ 2020-06-02 14:52 天池怪侠 阅读(766) 评论(0) 推荐(0) 编辑

C++ STL之 #include <iostream>头文件

摘要: #include <iostream> 阅读全文

posted @ 2020-06-02 14:50 天池怪侠 阅读(376) 评论(0) 推荐(0) 编辑

C++ STL之 #include <map>头文件

摘要: #include <map> 阅读全文

posted @ 2020-06-02 14:48 天池怪侠 阅读(1220) 评论(0) 推荐(0) 编辑

C++ STL之 #include <deque>头文件

摘要: 双向队列是C++标准库容器之一,其详细用途可参见如下网址: http://www.cplusplus.com/reference/deque/deque/ 阅读全文

posted @ 2020-06-02 14:46 天池怪侠 阅读(775) 评论(0) 推荐(0) 编辑

C++ STL之 #include <algorithm>头文件

摘要: 在C++中头文件algorithm中包括一些常用的方法,如下所示: <1> sort函数是应用非常广泛的方法,其内部实现是快速排序; 其有两种模式:默认模式和自定义模式 (1)默认模式,默认升序 函数原型 void sort (RandomAccessIterator first, RandomAc 阅读全文

posted @ 2020-06-02 14:44 天池怪侠 阅读(551) 评论(0) 推荐(0) 编辑

导航