C/C++
DanDan_M
这个作者很懒,什么都没留下…
展开
-
C/C++语言中的#和##的作用
经常遇到C/C++宏定义中的#,#的用法分为两种:#和###表示将宏定义中的参数变成字符串##表示将宏定义中的参数变成字符串连在一起例子: #include <iostream>#define STR(a) #a#define FUNC(a, b) a##bint main(){ using namespace std; ...原创 2018-09-27 11:57:43 · 1986 阅读 · 0 评论 -
c++不用库函数实现strcat
自己写的,就不写注视了,原创 2014-05-14 09:21:36 · 2371 阅读 · 0 评论 -
c++中的const与指针
在c/c++中,指针本身就是一个难点,再加与const的结合,常会产生许多让人费解的地方,在这里做个小结。 1.定义const对象const int buffsize=512;因为常量定义后就不能修改,所以定义时必须初始化.const i,j=0; //error,i没有初始化2.const对象默认为文件的局部变量//file1.ccextern转载 2014-08-22 22:14:44 · 398 阅读 · 0 评论 -
C++学习(1)--map
map的官方定义:MapMaps are associative containers that store elements formed by a combination of a key value and a mapped value, following a specific order.In a map, the key values are generally used ...原创 2019-03-17 14:48:05 · 79 阅读 · 0 评论