会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
liuw_flexi
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
···
29
下一页
2020年12月11日
Mac上安装boost, Xcode中使用
摘要: 参考了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
阅读(257)
评论(0)
推荐(0)
2020年12月8日
重载
摘要: 函数重载:同一作用域,函数名相同,参数个数,参数数据类型不同作用域+返回类型+函数名+参数列表无法按返回值类型区分遇到默认参数的函数要注意二义性实参的个数可以不等于形参吗?C++里不行
阅读全文
posted @ 2020-12-08 10:51 liuw_flexi
阅读(87)
评论(0)
推荐(0)
2020年12月1日
C++中引用C
摘要: 一般我们打开一个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
阅读(338)
评论(0)
推荐(0)
const 看我这个就够了
摘要: 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
阅读(85)
评论(0)
推荐(0)
2020年11月27日
先进后出的栈
摘要: 先进后出,不一定要全部入栈之后再出栈,没入栈完也可以先出栈。规律:出栈的每一个元素的后面,其中比该元素先入栈的一定按照入栈逆顺序排列。举例说明:已知入栈顺序: 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
阅读(437)
评论(0)
推荐(0)
2020年11月19日
继承
摘要: 继承关键字: 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
阅读(104)
评论(0)
推荐(0)
2020年11月5日
iOS 适配暗黑模式
摘要: 不管是UIView,还是UIViewController或者子类 在切换 ”设置“ 中的 “显示与亮度” 中 模式时,都会调用一个方法,这个方法是系统API swift: //MARK:暗黑模式监听 override func traitCollectionDidChange(_ previousT
阅读全文
posted @ 2020-11-05 09:59 liuw_flexi
阅读(848)
评论(0)
推荐(0)
2020年10月30日
【C++ STL】容器的选择
摘要: 转自:https://www.cnblogs.com/ChinaHook/p/6985531.html c++提供了各具特长的容器,那么我们该如何选择最佳的容器? 缺省状态下应该选择vector,因为vector内部结构最简单,并允许随机存取,所以数据的存取十分方便,数据的处理也快。 如果经常要在头
阅读全文
posted @ 2020-10-30 09:33 liuw_flexi
阅读(166)
评论(0)
推荐(0)
2020年10月16日
SwiftUI状态绑定:@State
摘要: 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
阅读(521)
评论(0)
推荐(0)
2020年10月15日
C++虚函数, 纯虚函数
摘要: 首先看这么一个例子: #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
阅读(143)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
29
下一页
公告