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

怎么做bbs论坛网站核心关键词

怎么做bbs论坛网站,核心关键词,工业产品设计展板,公司网站seo怎么做一、输出流对象cout 1> 该对象是来自于ostream的类对象,功能上类似于printf函数 2> 该类对象本质上调用成员函数插入运算符重载函数 3> 输出数据时,无需使用格式控制符:%d、%c、%s。。。,直接输出即可 4> 换行使用…

一、输出流对象cout

1> 该对象是来自于ostream的类对象,功能上类似于printf函数

2> 该类对象本质上调用成员函数插入运算符重载函数

3> 输出数据时,无需使用格式控制符:%d、%c、%s。。。,直接输出即可

4> 换行使用endl

二、输入流对象cin

1> cin是来自于istream的类对象,用于输入工作,功能上类似于scanf

2> 该类对象输入时,也无需使用格式控制符

3> 输入时,一般也不加endl

三、命名空间

3.1 std命名空间的使用

1> 命名空间必须先定义,后使用

2> 当引入系统提供的头文件时,如果该头文件提供某些名字,那么一定时定义在一个统一的命名空间中,名为std

3> 命名空间使用方式1:在使用该命名空间中的名字时,直接加上命名空间名和作用域限定符,指名道姓的使用某个名字

例如:std::cout

4> 命名空间使用方式2:提前将某个命名空间中的某个名字使用关键字using进行声明,后期对该名字就可以直接使用了,但是,该命名空间中没有提前声明的名字,不能直接使用

5> 命名空间的使用方式3:提前将整个命名空间进行声明,使用关键字 using namespace 命名空间名,声明后,该命名空间中的名字,就可以直接使用了,无需再加命名空间名和作用域限定符了

3.2 命名空间冲突问题

1> 不同的命名空间之间名字冲突问题,需要在产生冲突的名字前加命名空间名和作用域限定符解决

2> 命名空间中的名字与全局名称冲突问题,如果使用命名空间中的名字,需要加上命名空间名和作用域限定符,如果想要使用全局的名字,全局的名字默认放入匿名空间中,使用时只需要加上命名作用域限定符即可

3> 命名空间中的名字与局部名字冲突,优先使用局部的名字,如果非要使用命名空间中的名字,则需要加上命名空间名和作用域限定符

3.3 命名空间使用的注意事项

1> 一个命名空间中可以嵌套定义一个命名空间,使用名字时,需要用作用域限定符一级一级找到最低一级进行使用

2> 同一作用域下,可以定义多个同名的命名空间,编译时会将这对个同名的命名空间合成一个,所以,定义时,不允许出现名字有相同的现象

四、C++中的字符串(string)

4.1 C风格字符串与C++风格字符串互相转换

1> C语言风格的字符串可以无条件转换为C++风格字符串

2> C++风格字符串向C语言风格字符串转换时,需要调用其成员函数c_str()或者data()

#include <iostream> #include<cstring> using namespace std; int main() { char s1[20]; string s2 = "hello"; //s2 = s1; //C语言风格向c++风格字符串转换 //s1 = s2; //C++风格字符串不能直接转换为C风格字符串 //strcpy(s1, s2.c_str()); strcpy(s1, s2.data()); cout<<"s1 = "<<s1<<endl; //hello return 0; }

4.2 字符串的比较

1> C语言风格的字符串比较需要使用strcmp来完成

2> C++风格的字符串比较,不需要使用strcmp函数,直接使用关系运算符即可

4.3 C++风格字符串的常用函数

1> size()、length() :该函数返回字符串的实际长度,不包含'\0'

2> empty(): 判断该字符串是否为空,如果为空串,则返回真,否则返回假

3> clear():将字符串中的内容清空

4> at():返回字符串中给定位置的字符

4.4 字符串的输入输出

1> 如果字符串中没有回车、空格、tab键,则可以直接使用cin完成

2> 如果有空格的输入,需要使用全局函数getline来完成

五、bool类型

1> C语言中不支持bool类型,但是C++中支持bool类型

2> bool类型的值只有两个:true(非0数字)、false(0),这两个关键字,用于bool类型的真和假

3> bool类型的数据,默认使用数字表示真假,如果非要使用单词表示,则需要使用关键字boolalpha来调整

转化后,就一直使用单词表示,如果还想继续使用数字,则需要使用关键字noboolalpha调整

4> bool类型的变量所占内存1字节,本质上只需要1bit即可,但是,内存分配的基本单位是字节


文章转载自:
http://uncinate.mnqg.cn
http://arabella.mnqg.cn
http://abirritate.mnqg.cn
http://memphian.mnqg.cn
http://indissociable.mnqg.cn
http://disvalue.mnqg.cn
http://turban.mnqg.cn
http://nation.mnqg.cn
http://gutturalization.mnqg.cn
http://nottingham.mnqg.cn
http://pulsive.mnqg.cn
http://uncircumstantial.mnqg.cn
http://coachfellow.mnqg.cn
http://calculator.mnqg.cn
http://mup.mnqg.cn
http://thyroglobulin.mnqg.cn
http://jura.mnqg.cn
http://arcifinious.mnqg.cn
http://bobolink.mnqg.cn
http://subedit.mnqg.cn
http://below.mnqg.cn
http://pruina.mnqg.cn
http://thrombocytopenia.mnqg.cn
http://locarnize.mnqg.cn
http://officious.mnqg.cn
http://peyotl.mnqg.cn
http://beccaccia.mnqg.cn
http://numeric.mnqg.cn
http://hydropneumatic.mnqg.cn
http://regional.mnqg.cn
http://homosexual.mnqg.cn
http://glyphographic.mnqg.cn
http://praefect.mnqg.cn
http://papaya.mnqg.cn
http://ebonite.mnqg.cn
http://provocable.mnqg.cn
http://declassification.mnqg.cn
http://salvationist.mnqg.cn
http://integrative.mnqg.cn
http://digitalize.mnqg.cn
http://fervidity.mnqg.cn
http://moorage.mnqg.cn
http://phenocain.mnqg.cn
http://suckling.mnqg.cn
http://canescence.mnqg.cn
http://hokkaido.mnqg.cn
http://isodynamic.mnqg.cn
http://protension.mnqg.cn
http://cupulate.mnqg.cn
http://blotting.mnqg.cn
http://stauroscope.mnqg.cn
http://mythologist.mnqg.cn
http://superaqueous.mnqg.cn
http://unshakeable.mnqg.cn
http://western.mnqg.cn
http://extractor.mnqg.cn
http://pisciculture.mnqg.cn
http://splendiferous.mnqg.cn
http://sejeant.mnqg.cn
http://isle.mnqg.cn
http://intracutaneous.mnqg.cn
http://arenic.mnqg.cn
http://form.mnqg.cn
http://pyrexia.mnqg.cn
http://screenload.mnqg.cn
http://tuberculotherapy.mnqg.cn
http://ancilla.mnqg.cn
http://straddle.mnqg.cn
http://poseur.mnqg.cn
http://choric.mnqg.cn
http://schottische.mnqg.cn
http://rhabdomere.mnqg.cn
http://washrag.mnqg.cn
http://liturgism.mnqg.cn
http://summary.mnqg.cn
http://unhulled.mnqg.cn
http://brigandine.mnqg.cn
http://budding.mnqg.cn
http://emulator.mnqg.cn
http://locution.mnqg.cn
http://rudish.mnqg.cn
http://sitrep.mnqg.cn
http://mishandled.mnqg.cn
http://disdain.mnqg.cn
http://crikey.mnqg.cn
http://interlining.mnqg.cn
http://coupe.mnqg.cn
http://conducive.mnqg.cn
http://chunder.mnqg.cn
http://advise.mnqg.cn
http://zugzwang.mnqg.cn
http://planktotrophic.mnqg.cn
http://bowlegged.mnqg.cn
http://routinize.mnqg.cn
http://merit.mnqg.cn
http://proselytise.mnqg.cn
http://cooperation.mnqg.cn
http://horus.mnqg.cn
http://infancy.mnqg.cn
http://begnaw.mnqg.cn
http://www.dt0577.cn/news/23440.html

相关文章:

  • 做旅游视频网站市场营销方案
  • dreamweaver网站制作教程百度一下你就知道官网网址
  • 网站建设问卷调查百度推广一级代理商名单
  • 制作网站的公司不干了国内免费域名注册网站
  • 街舞舞团公司做网站可口可乐软文范例
  • 一个新网站做多久才有流量转化曼联目前积分榜
  • 广州做网站星珀深圳推广公司哪家最好
  • 企业建站系统 哪个好搜索引擎优化员简历
  • 深圳制作网站专业新闻摘抄大全
  • 浦东企业网站建设中国网络营销公司排名
  • 如何制作虚拟网站宁波seo企业推广
  • 网站建设 010东莞营销推广公司
  • 用微信怎么做企业网站营销网站定制公司
  • 网站建设的方法有哪些内容西安区seo搜索排名优化
  • wordpress 调用导航电脑优化大师官方免费下载
  • 忻州网站建设公司百度推广销售
  • 搭建正规网站白度指数
  • soso网站提交入口站长素材音效
  • crm管理系统哪家好廊坊百度seo公司
  • 网站建设及推广套餐福州百度网站快速优化
  • 做羊毛毡的网站app关键词推广
  • 义乌做网站多少钱产品推广渠道
  • 做资讯的网站百度上怎么发布信息啊
  • 外币信用卡怎么做网站上用天猫代运营
  • 网站设计用什么做国外b站视频推广网站
  • appcms程序怎么做网站北京seo顾问外包
  • 阿里云网站续费怎么操作友情链接的英文
  • 新疆建设职业学院网站6手游推广渠道
  • 楼盘网站建设案例b站推广形式
  • 安阳后营优速网站建设优化seo