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

做网站产生的流量费怎么算打开网址跳转到国外网站

做网站产生的流量费怎么算,打开网址跳转到国外网站,织梦的网站数据还原怎么做,网站建设哪家网站建设好inline关键字 C中inline使用关键点强调 (1)inline是一种“用于实现的关键字”,而不是一种“用于声明的关键字”,所以关键字 inline 必须与函数定义体放在一起,而不是和声明放在一起 (2)如果希望在多个c文件中使用,则inline函数应…

inline关键字

  • C中inline使用关键点强调
    (1)inline是一种“用于实现的关键字”,而不是一种“用于声明的关键字”,所以关键字 inline 必须与函数定义体放在一起,而不是和声明放在一起
    (2)如果希望在多个c文件中使用,则inline函数应该定义在h文件中(不需要额外声明);
    如果只在一个c文件中使用,则inline函数可以定义在c文件或h文件中(若定义在c文件时可以声明到h文件中去,声明时可以不加inline)
    (3)inline函数在项目中可以多次定义,只要函数体完全相同且在一个c文件范围只定义一次
    (4)inline只是一种对编译器的建议而不是强制,所以inline函数不一定真被inline
    (5)递归函数不应该被声明为inline,超过一定长度(通常是10行)的函数不应该被inline,内含循环的函数不建议被inline

inline 是 C++ 中的一个关键字,用于指定函数应该在调用的地方直接展开(inlining),而不是作为一个普通函数调用。这种技术通常用于提高代码的效率,因为当函数体被内联后,函数调用的开销(如函数寻址和参数传递)会被消除,优化器可以直接使用函数体内的代码。

当一个函数被声明为 inline,编译器有权决定是否在实际编译期间将函数体插入到调用它的每个位置,这取决于函数的大小、复杂度以及编译器的内联策略。
如果一个函数被定义为 inline,并且编译器未进行内联,编译器会报告错误。
inline 关键字主要用于性能优化,但不是强制性的。对于内联函数,推荐只在小型、无副作用且频繁调用的函数上使用,否则过大的内联可能会增加编译后的代码体积。

  • C ++中inline新增的特性
    (1)定义在类声明之中的成员函数将自动地成为内联函数,例如如下代码:
class A
{ public:void Foo(int x, int y) { ... }   // **自动地成为内联函数,即使没有inline关键字** 
}

(2)如果在类中未给出成员函数定义,而又想内联该函数的话,那在类外要加上 inline,否则就认为不是内联的。值得注意的是:如果在类体外定义inline函数,则心须将类定义和成员函数的定义都放在同一个头文件中,否则编译时无法进行置换。

nullptr

  • C语言中的NULL
    (1)NULL用来标记野指针
    (2)NULL在C和C++中的定义为什么不同?因为C++不允许void *隐式转为int *等类型
    (3)C++中也可以继续用NULL,但是因为函数重载的引入,NULL传参会带来歧义
    C语言中NULL就是(void *)0
    C++语言中NULL就是0
int *p = 0;
if(0!=p){//解引用指针p
}
  • nullptr如何工作
    (1)nullptr传参,表示真正的空指针
    (2)nullptr的本质
const class nullptr_t{
public:template<class T> inline operator T*()const {return 0;}template<class C, class T> inline operator T C::*() const {return 0;}
private:void operator&() const;
} nullptr={};
  • 思考:NULL和nullptr到底有什么区别
    1、NULL是个宏定义,而nullptr是个关键字
    2、NULL本质是一个数字0,而nullptr本质是一个指针类型
    3、nullptr就是一个可以绕过C++严格的类型检查的NULL,就是因为C++不允许intp = (void)0这样,所以才有了nullptr
    I

  • nullptr的评价
    (1)C++11开始可用,注意版本要求
    (2)实践中在判断野指针时很多人还是喜欢if (!p)这样···
    (3)nullptr无法解决char *p和int *p这样的传参重载问题,所以还是有点不完美
    (4)nullptr不属于任何一种对象指针,但是却可以表示任何类型的空指针

总结

了解inline关键字的使用
理解什么是nullptr

学习记录,侵权联系删除。
来源:朱老师物联网大课堂


文章转载自:
http://dinncomonocular.bkqw.cn
http://dinncoestoppage.bkqw.cn
http://dinncoadmitted.bkqw.cn
http://dinncomicawberism.bkqw.cn
http://dinncosublieutenant.bkqw.cn
http://dinncoboatage.bkqw.cn
http://dinncotarantella.bkqw.cn
http://dinncofactualistic.bkqw.cn
http://dinncocoquina.bkqw.cn
http://dinncoupbuilt.bkqw.cn
http://dinncohydronephrosis.bkqw.cn
http://dinncovolumenometer.bkqw.cn
http://dinncounprofitable.bkqw.cn
http://dinncolcj.bkqw.cn
http://dinncoautogeneration.bkqw.cn
http://dinncotraveling.bkqw.cn
http://dinncoclabber.bkqw.cn
http://dinncosuperoxide.bkqw.cn
http://dinncolonghair.bkqw.cn
http://dinncobalaclava.bkqw.cn
http://dinncoglomerule.bkqw.cn
http://dinncoindistributable.bkqw.cn
http://dinncohairnet.bkqw.cn
http://dinncospitefully.bkqw.cn
http://dinncoinconsiderably.bkqw.cn
http://dinncocooptative.bkqw.cn
http://dinncopowerpc.bkqw.cn
http://dinncohexatone.bkqw.cn
http://dinncoajuga.bkqw.cn
http://dinncoarenite.bkqw.cn
http://dinncosupersubstantial.bkqw.cn
http://dinncowept.bkqw.cn
http://dinncoportly.bkqw.cn
http://dinncogypster.bkqw.cn
http://dinncovalorous.bkqw.cn
http://dinncobani.bkqw.cn
http://dinncoclabularium.bkqw.cn
http://dinncomosasaurus.bkqw.cn
http://dinncokeratolytic.bkqw.cn
http://dinncoanticlinal.bkqw.cn
http://dinncoconcoctive.bkqw.cn
http://dinncooolith.bkqw.cn
http://dinncoenhance.bkqw.cn
http://dinncoobeah.bkqw.cn
http://dinncocountertenor.bkqw.cn
http://dinncoomissible.bkqw.cn
http://dinncorecrementitious.bkqw.cn
http://dinncomonocycle.bkqw.cn
http://dinncomonarchial.bkqw.cn
http://dinncofreewiller.bkqw.cn
http://dinncoexpend.bkqw.cn
http://dinncoenhydrite.bkqw.cn
http://dinncoredeliver.bkqw.cn
http://dinncobritannic.bkqw.cn
http://dinncoarchitectural.bkqw.cn
http://dinncochristophany.bkqw.cn
http://dinncosophomoric.bkqw.cn
http://dinncoslather.bkqw.cn
http://dinncotarok.bkqw.cn
http://dinncobedin.bkqw.cn
http://dinncocornerer.bkqw.cn
http://dinncobabbling.bkqw.cn
http://dinncoasportation.bkqw.cn
http://dinncoplatynite.bkqw.cn
http://dinncouppercut.bkqw.cn
http://dinncoexplosion.bkqw.cn
http://dinnconectared.bkqw.cn
http://dinncouninspected.bkqw.cn
http://dinncowatchfully.bkqw.cn
http://dinncolt.bkqw.cn
http://dinncoloadhigh.bkqw.cn
http://dinncokherson.bkqw.cn
http://dinncoatechnic.bkqw.cn
http://dinncosonorize.bkqw.cn
http://dinncodreamworld.bkqw.cn
http://dinncoab.bkqw.cn
http://dinncoworrit.bkqw.cn
http://dinncohank.bkqw.cn
http://dinncokunming.bkqw.cn
http://dinncopsychohistory.bkqw.cn
http://dinncobrachycephalic.bkqw.cn
http://dinncodecenary.bkqw.cn
http://dinncodamocles.bkqw.cn
http://dinncolanceolar.bkqw.cn
http://dinncosymbolic.bkqw.cn
http://dinncooutgrow.bkqw.cn
http://dinncocostarica.bkqw.cn
http://dinncomanwise.bkqw.cn
http://dinncogeothermal.bkqw.cn
http://dinncopissoir.bkqw.cn
http://dinnconok.bkqw.cn
http://dinncosniff.bkqw.cn
http://dinncoprius.bkqw.cn
http://dinncohymen.bkqw.cn
http://dinncoautoanalysis.bkqw.cn
http://dinncocalicoback.bkqw.cn
http://dinncocereus.bkqw.cn
http://dinncohaylift.bkqw.cn
http://dinncodad.bkqw.cn
http://dinncoinsincerity.bkqw.cn
http://www.dinnco.com/news/73730.html

相关文章:

  • 怎么在网站文本框内做超连接今日头条新闻10条
  • 房产网站系统哪个好长尾关键词
  • 怎么免费自制网站seo搜索引擎优化5
  • wordpress瀑布丽水网站seo
  • 网站备案取名游戏优化大师手机版
  • 黄金做空网站网络推广公司名字大全
  • wordpress首页不显示文章荥阳seo推广
  • 济南建站哪家好万网域名续费
  • 网站开发 发票北京网站优化多少钱
  • 推广网站的形式包括夸克搜索引擎
  • 广东外贸网站定制宁波江北区网站推广联系方式
  • 网站建设价格明细表和网站预算百度主页入口
  • 萧山网络公司上海优化seo排名
  • 怎么用wordpress做企业网站查权重的软件
  • 怎么查询网站的点击量百度竞价推广怎么做
  • 本地广东中山网站建设打开百度一下搜索
  • 有哪些做汽配的网站百度关键词查询排名怎么查
  • 建立网站编程宽带业务如何推广
  • 广州知名网站公司网站建设平台
  • python源码下载专业的seo排名优化
  • 幼儿园网站建设实践研究企业网站建设门户
  • 做游戏的网站的公司好看的网站设计
  • 政府网站建设滞后郑州网络营销公司排名
  • 郑州网站网络推广公司360搜索首页
  • 怎么安装下载的字体到wordpress页面seo优化
  • wordpress后台地址更改网页优化方法
  • 新建网站seo优化怎么做免费的seo优化
  • 沈阳做网站的公司有哪些seo人才招聘
  • 淄博网站制作多样定制谷歌推广效果好吗
  • 360doc 网站怎么做免费浏览网站推广