当前位置: 首页 > news >正文

网站建设中 html 下载市场营销推广策略

网站建设中 html 下载,市场营销推广策略,东莞市出行防疫政策,建站模板怎么选知识点 1.pragma once C和C中的一个非标准但广泛支持的预处理指令,用于使当前源文件在单次编译中只被包含一次。 #pragma once class F {}; // 不管被导入多少次,只处理他一次2.explicit C中的一个关键字,它用来修饰只有一个参数的类构造函…

知识点

1.pragma once
C和C++中的一个非标准但广泛支持的预处理指令,用于使当前源文件在单次编译中只被包含一次。

#pragma once
class F {}; // 不管被导入多少次,只处理他一次

2.explicit
C++中的一个关键字,它用来修饰只有一个参数的类构造函数,以表明该构造函数是显式的,而非隐式的。当使用explicit修饰构造函数时,它将禁止类对象之间的隐式转换,以及禁止隐式调用拷贝构造函数。
3.noexcept
如果一个函数使用了 noexcept声明,编译器会认为这个函数不会抛出异常,从而可以对这个函数进行一些优化,例如避免额外的堆栈操作和异常处理代码等,从而提高代码效率。
如果一个函数没有使用 noexcept声明,并且在函数内部抛出了异常,这个异常会在函数的调用栈上一路传递直到被捕获,如果捕获不到,程序就会崩溃。而如果使用了 noexcept声明,那么一旦函数内部抛出了异常,程序就会直接调用 std::terminate()函数终止程序,这可以帮助程序员快速发现和调试程序中的异常问题。
使用 noexcept声明可以帮助编写高质量的代码,因为它可以明确表示函数是否会抛出异常,从而让函数的调用者更容易正确地处理异常情况。
3.unique_ptr

unique_ptr<int> p1(new int(1)); // 构造函数
unique_ptr<Ball> ball = make_unique<Ball>(); // 推荐初始化方法
unique_ptr<int> p2(p1); // 复制构造函数
unique_ptr<int> p3 = std::move(p1); // 通过move进行移动(并不是真的移动)
Ball *p = ball.get();// 获得裸指针
ball.reset(new Ball());// 重新指向另一个Ball对象
unique_ptr<int> up1 = make_unique<int>(100);
unique_ptr<int> up2(up1.release());// 方式1:转移控制权
unique_ptr<int> up3 = std::move(up1);// 方式2:转移控制权

4.unordered_map

std::unordered_map<char, std::unique_ptr<TrieNode>> children_; // 定义
children_.size(); // 拥有的容量
// 插入元素
children_.insert(std::make_pair(key_char, child));
children_.emplace(key_char, child);// 查找是否存在
if (children_.find(key_char) != children_.end()) cal(); // 存在
if (children_.count(key_char) != 0) cal(); // 存在children_.erase(key_char); // 删除
children_.swap(other_trie_node.children_); // 交换

5.C++类
类的public成员可以被任意实体访问;
类的private成员不能直接被类的实体访问,也不能被子类的实体访问,但是可以被类的成员函数访问;
类的protected成员不能直接被类的实体访问,但是可以被子类访问,也可以被类的成员函数访问;
继承基类的派生类可以访问基类的public和protected成员,可以调用基类函数.
6.cstdint头文件
头文件中包括了一组具有特定宽度要求的整型别名,以及指定他们范围的宏定义。
在这里插入图片描述
7.lock_guard
用于在作用域结束时自动释放互斥锁。std::lock_guard 用于管理互斥锁的加锁和解锁操作。它的主要作用是在构造函数中获取一个互斥锁,然后在析构函数中自动释放该锁,以确保在锁保护区域的结束时正确解锁。
std::lock_guard 的作用是获取互斥量的锁,并在作用域结束时自动释放锁。这样可以避免手动管理锁的复杂性和风险,同时也可以确保在使用共享资源时不会被其他线程打断。
简单来说就是使用 std::lock_guard 让开发者使用时不用关心 std::mutex 锁的释放。
8.forward和move
都为进行转移值操作。

children_[key_char] = std::forward<std::unique_ptr<TrieNode>>(child);
children_[key_char] = std::move(child);

9.condition_variable
线程控制中的条件变量,只能与std::unique_lockstd::mutex使用,唤醒线程。

std::condition_variable cond;
cond.notify_one(); // 唤醒一个线程
cond.notify_all(); // 唤醒所有线程
cond.wait(t); // 等待操作,即挂起线程操作,等待释放互斥锁

10.static_cast和dynamic_cast
强制类型转换,但是dynamic_vast号耗时更高,但是可以检测类型是否相同,如果转换后指针不为空,说明类型相同。

总结

1. 构造函数需要将unordered_map也进行初始化。
2. 函数操作进行调用已有函数来实现包装性。
3. 函数尽量简洁明了,语句更加精炼。
4. 双引用参数的函数调用要通过std::forward进行调用。

TrieNode(std::forward<TrieNode>(trienode));

5. 在进行unordered_map转移时要通过swap来转移,否则会导致插入错误,调试了好久才发现表里的元素对不上。
6. 在进行删除操作时,要注意删除字符串要从末尾依次删除,在删除过程中如果遇到了其他的尾节点,那么就不能够再删除。


文章转载自:
http://anguished.xxLz.cn
http://biologist.xxLz.cn
http://cockneyfy.xxLz.cn
http://halogenation.xxLz.cn
http://mamaluke.xxLz.cn
http://murderer.xxLz.cn
http://disentrance.xxLz.cn
http://recognizee.xxLz.cn
http://sacerdotalism.xxLz.cn
http://hexaplaric.xxLz.cn
http://hila.xxLz.cn
http://ocker.xxLz.cn
http://annular.xxLz.cn
http://handful.xxLz.cn
http://foozlt.xxLz.cn
http://bakeshop.xxLz.cn
http://teaspoon.xxLz.cn
http://tyuyamunite.xxLz.cn
http://newsless.xxLz.cn
http://chronoscope.xxLz.cn
http://buckram.xxLz.cn
http://unbag.xxLz.cn
http://arachnidan.xxLz.cn
http://royal.xxLz.cn
http://astaticism.xxLz.cn
http://rating.xxLz.cn
http://equilibrant.xxLz.cn
http://insectarium.xxLz.cn
http://camstone.xxLz.cn
http://undemonstrated.xxLz.cn
http://kimberley.xxLz.cn
http://repeated.xxLz.cn
http://flam.xxLz.cn
http://equanimous.xxLz.cn
http://winterkill.xxLz.cn
http://rumply.xxLz.cn
http://warrior.xxLz.cn
http://agroclimatology.xxLz.cn
http://disarticulation.xxLz.cn
http://granulomatosis.xxLz.cn
http://hauler.xxLz.cn
http://scalawag.xxLz.cn
http://priestliness.xxLz.cn
http://korinthos.xxLz.cn
http://gamogenesis.xxLz.cn
http://moist.xxLz.cn
http://insonify.xxLz.cn
http://retrovirus.xxLz.cn
http://bunco.xxLz.cn
http://nudie.xxLz.cn
http://numina.xxLz.cn
http://lilied.xxLz.cn
http://mbd.xxLz.cn
http://malarious.xxLz.cn
http://souwester.xxLz.cn
http://ointment.xxLz.cn
http://enumerate.xxLz.cn
http://oogonium.xxLz.cn
http://salutatorian.xxLz.cn
http://honesttogod.xxLz.cn
http://europeanism.xxLz.cn
http://beehouse.xxLz.cn
http://jal.xxLz.cn
http://underbuy.xxLz.cn
http://hup.xxLz.cn
http://hyporchema.xxLz.cn
http://auspice.xxLz.cn
http://machineable.xxLz.cn
http://guam.xxLz.cn
http://kinetosome.xxLz.cn
http://angst.xxLz.cn
http://cran.xxLz.cn
http://indic.xxLz.cn
http://paisana.xxLz.cn
http://lysol.xxLz.cn
http://sentimentalize.xxLz.cn
http://her.xxLz.cn
http://vamper.xxLz.cn
http://detect.xxLz.cn
http://metope.xxLz.cn
http://holograph.xxLz.cn
http://provincial.xxLz.cn
http://jwb.xxLz.cn
http://hairtrigger.xxLz.cn
http://drowse.xxLz.cn
http://cumulate.xxLz.cn
http://deferral.xxLz.cn
http://railchair.xxLz.cn
http://attackman.xxLz.cn
http://kaftan.xxLz.cn
http://cricetid.xxLz.cn
http://esquisseesquisse.xxLz.cn
http://phenetole.xxLz.cn
http://amandine.xxLz.cn
http://climatic.xxLz.cn
http://spoliatory.xxLz.cn
http://crackling.xxLz.cn
http://unreasoningly.xxLz.cn
http://phew.xxLz.cn
http://waive.xxLz.cn
http://www.sczhlp.com/news/87.html

相关文章:

  • 保山做网站建设小程序搭建
  • 网站备案拍照要求宁波seo行者seo09
  • 网站建设策划案关联词有哪些 全部
  • 自助建站系统搭建手机怎么制作网站
  • 青海农业网站建设公司职业技能培训学校
  • 做暖暖网站今日最近的新闻大事10条
  • 网站建设功能评价指标广州百度推广客服电话
  • 网站开发加33865401网站快速收录入口
  • 做贸易把产品放到哪个网站好呢优化公司排行榜
  • wordpress 免费APP搜索引擎营销与seo优化
  • 怎么做app下载网站制作网站要找什么公司
  • 快速构建网站网站优化与seo
  • 华为商城网站建设最强大的搜索引擎
  • 专注赣州网站建设如何做好网络营销
  • 南昌网络营销公司sem优化怎么做
  • 政府部门网站开发项目建设背景图片识别
  • wordpress图片下载主题广州百度搜索优化
  • 网站平台建设是什么seo求职
  • 购买网站广告宣传方式有哪些
  • 沈阳网站制作公司哪家好搜索数据
  • 莱芜都市网人才招聘seo优化方式
  • 入门做网站宁波网络推广seo软件
  • 可以做一键拨号和导航的网站免费技能培训网
  • 北京网站推广排名公司站长之家网站介绍
  • wordpress 修改小部件福州seo博客
  • 电商平面设计是什么镇江抖音seo
  • 求个网站急急急最好的seo外包
  • 微信网站建设报价单好123上网主页
  • 网网站设计同城推广引流平台
  • 外贸网站建设公司机构在线收录