上一页 1 2 3 4 5 6 7 ··· 29 下一页
摘要: 参考了https://www.cnblogs.com/kolane/p/12057744.html 使用终端安装 用Xcode新建C++项目 需要配置一下boost的路径 完了就能正常使用: #include <iostream> #include <boost/lambda/lambda.hpp> 阅读全文
posted @ 2020-12-11 10:19 liuw_flexi 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 函数重载:同一作用域,函数名相同,参数个数,参数数据类型不同作用域+返回类型+函数名+参数列表无法按返回值类型区分遇到默认参数的函数要注意二义性实参的个数可以不等于形参吗?C++里不行 阅读全文
posted @ 2020-12-08 10:51 liuw_flexi 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 一般我们打开一个C写的库,比如cJSON.h这个文件: #ifndef cJSON__h #define cJSON__h #ifdef __cplusplus extern "C" { #endif C声明部分XXXXXXXXXXXXXXXX #ifdef __cplusplus } #endif 阅读全文
posted @ 2020-12-01 15:36 liuw_flexi 阅读(326) 评论(0) 推荐(0) 编辑
摘要: code: #include <iostream> int main(int argc, const char * argv[]) { // insert code here... std::cout << "Hello, World!\n"; int age = 10; const int *p0 阅读全文
posted @ 2020-12-01 15:21 liuw_flexi 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 先进后出,不一定要全部入栈之后再出栈,没入栈完也可以先出栈。规律:出栈的每一个元素的后面,其中比该元素先入栈的一定按照入栈逆顺序排列。举例说明:已知入栈顺序: 1 2 3 4 5判断出栈顺序: 4 3 5 1 2结果:不合理,原因是出栈元素3之后有 5 1 2 这三个元素,其中1 2 是比3先入栈的 阅读全文
posted @ 2020-11-27 16:26 liuw_flexi 阅读(399) 评论(0) 推荐(0) 编辑
摘要: 继承关键字: struct和class 继承的区别: #include <iostream> using namespace std; class A{ public: int a; protected: int b; private: int c; }; class B:A{ //默认privat 阅读全文
posted @ 2020-11-19 14:50 liuw_flexi 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 不管是UIView,还是UIViewController或者子类 在切换 ”设置“ 中的 “显示与亮度” 中 模式时,都会调用一个方法,这个方法是系统API swift: //MARK:暗黑模式监听 override func traitCollectionDidChange(_ previousT 阅读全文
posted @ 2020-11-05 09:59 liuw_flexi 阅读(761) 评论(0) 推荐(0) 编辑
摘要: 转自:https://www.cnblogs.com/ChinaHook/p/6985531.html c++提供了各具特长的容器,那么我们该如何选择最佳的容器? 缺省状态下应该选择vector,因为vector内部结构最简单,并允许随机存取,所以数据的存取十分方便,数据的处理也快。 如果经常要在头 阅读全文
posted @ 2020-10-30 09:33 liuw_flexi 阅读(139) 评论(0) 推荐(0) 编辑
摘要: code: // // ContentView.swift // StateDemo // // Created by udc on 2020/10/16. // Copyright © 2020 udc. All rights reserved. // import SwiftUI struct 阅读全文
posted @ 2020-10-16 13:14 liuw_flexi 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 首先看这么一个例子: #include <iostream> using namespace std; class Animal{ public: void speak(){ cout << "Animal speak" << endl; } }; class Dog :public Animal{ 阅读全文
posted @ 2020-10-15 13:10 liuw_flexi 阅读(125) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 29 下一页