![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
咸鱼hao
这个作者很懒,什么都没留下…
展开
-
C++ IO操作
C++ IO操作原创 2020-03-15 03:31:19 · 113 阅读 · 0 评论 -
C++ STL String学习
C++ STL String学习#include<iostream>#include<string>using namespace std;int test_string(){ // string类初始化 string s1 = "aaa"; string s4 = string("dddd"); string s2 = string(s1); //s1 ...原创 2019-04-29 16:05:17 · 113 阅读 · 0 评论 -
C++ 指针引用
C++ 指针引用#include<iostream>using namespace std;int arr[10] = { 1,2,3,4,5,6,7,8,9,10 };void swap_pointer(int *x, int *y) //指针作为函数参数{ int temp = *y; *y = *x; *x = temp;}void swap_ref(in...原创 2019-04-29 16:07:14 · 225 阅读 · 0 评论 -
C++ STL Map、迭代器
一 、C++ STL Map#include<iostream>#include<map>#include<string>using namespace std;int my_map(){ map<int, string> infor; // 插入 infor[0] = "aaa"; infor.insert(pair<in...原创 2019-04-29 16:11:55 · 1962 阅读 · 0 评论 -
C++中const int * 和 int * const 及void *
#include<iostream>using namespace std;// 可传入任意类型的指针void* test_void(void* v){ cout << v; //输出地址 cout << *(int *)v; //获取值 int i = 3; int* pi = &i; return pi; //可以返回任意类型指针...原创 2019-05-09 00:39:27 · 1151 阅读 · 0 评论