上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要: 一、函数默认参数 #include <iostream> using namespace std; ​ //函数默认参数 //如果我们自己传入了数据,就用自己的数据,如果没有,那么就用默认值。 //语法: 返回值类型 函数名( 形参 = 默认值 ) int func(int a, int b = 2 阅读全文
posted @ 2021-08-10 12:22 yiwenzhang 阅读(39) 评论(0) 推荐(0) 编辑
摘要: MBTiles 1.3 本文件中的关键词“必须”、“不得”、“要求”、“应”、“不得”、“应”、“不应”、“建议”、“可”和“可选”应按照RFC 2119中的说明进行解释。 Abstract MBTiles是一种规范,用于在SQLite数据库中存储平铺地图数据,以便立即使用和传输。MBTiles文件 阅读全文
posted @ 2021-08-09 14:46 yiwenzhang 阅读(538) 评论(0) 推荐(0) 编辑
摘要: 引用 一、引用的基本使用: #include <iostream> using namespace std; ​ int main() { //引用的基本语法 int a = 10; int &b = a; ​ cout << "a = " << a << endl; cout << "b = " 阅读全文
posted @ 2021-08-04 19:02 yiwenzhang 阅读(38) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> ​ using namespace std; ​ //全局变量 int g_a = 10; int g_b = 10; ​ //const 修饰的全局变量,全局常量 const int c_g_a = 10; const int c_g_b = 10; ​ i 阅读全文
posted @ 2021-08-04 17:41 yiwenzhang 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 主要功能步骤: #include <iostream> #include <string> using namespace std; //5.1 联系人结构体 struct Person { string m_Name; //姓名 int m_Sex; //性别 1 男,2 女 int m_Age; 阅读全文
posted @ 2021-08-03 15:43 yiwenzhang 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1.grovvy简单语法 // 定义字符串 def s = "TEST" println s; // 定义一个集合类型 def list = ['a','b'] // 往list中添加元素 list << 'c' // 取出list中第三个元素 println list.get(2) // 定义一个 阅读全文
posted @ 2021-08-03 09:08 yiwenzhang 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 1、结构体定义: 结构体属于用户自定义数据类型,允许用户存储不同的数据类型。 语法: struct 结构体名 { 结构体成员列表 }; #include <iostream> #include <string> using namespace std; ​ //1.创建学生数据类型 //学生:姓名、 阅读全文
posted @ 2021-08-02 18:13 yiwenzhang 阅读(620) 评论(0) 推荐(0) 编辑
摘要: 1、指针操作数组 #include <iostream> using namespace std; ​ int main(){ int arr[10] = {1,2,3,4,5,6,7,8,9,10}; cout << "The first element is:" << arr[0] << end 阅读全文
posted @ 2021-08-02 15:45 yiwenzhang 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 1.常量指针(const * ),红色标记不可修改 #include <iostream> using namespace std; ​ int main(){ int a = 20; int b = 10; const int * p = &a;//指针的指向可以修改,但是指针指向的值不可改, / 阅读全文
posted @ 2021-08-02 12:40 yiwenzhang 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 1.打印LOG宏 #include <stdio.h> ​ // 两个井号连接字符串,避免agrs为空 // 条件式编译 gcc -D DEBUGGER ​ #ifdef DEBUG #define log(frm, args...){\ printf("[%s : %s : %d]",__FILE 阅读全文
posted @ 2021-08-01 18:19 yiwenzhang 阅读(484) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页