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

天津网站制作公司哪家好seo教程下载

天津网站制作公司哪家好,seo教程下载,深圳沙头网站建设,wordpress无法创建数据库C绪论 c是c语言的扩充,C包含了C的所有属性,换一句话说,C语言在C中都合法。 C语言编程思想:面向过程 c编程思想:面向对象 可以说在C中一切皆对象。 c的三大属性:封装,继承,多态。…

C++绪论

c++是c语言的扩充,C++包含了C的所有属性,换一句话说,C语言在C++中都合法。

C语言编程思想:面向过程

c++编程思想:面向对象

可以说在C++中一切皆对象。

c++的三大属性:封装,继承,多态。

C++对C的兼容

1> C语言文件

编写一个C语言文件:XXX.c 编译:gcc XXX.c

2> C++语言文件

编写一个C++文件:XXX.cpp 编译:g++ XXX.cpp

3> 头文件

C: 以.h结尾的文件 eg:#include

C++: 不以.h结尾 eg:#include

C++的第一条语句

cout

cout是输出类的类对象,具有输出功能,可以自动识别数据类型,无需加格式符。

<<  插入符 (输出符)

endl :换行

cin

cin 是输入类的类对象,具有输入功能,可以自动识别数据类型,无需加格式符

>> 提取符(输入符)

不需要给变量加地址符

C++中的数据类型

C++的数据类型:基本数据类型、构造数据类型

基本数据类型:char、short、int、long、float、double、bool、string

构造数据类型:数组、指针、结构体、共用体、枚举、类

C++中字符串类型string

字符串类型的初始化和赋值

    string str1; // == int a  无参构造函数

    string str2 = "hello world"; //定义变量的同时赋值,初始化
    cout << str2 << endl;

    string str3 = str2; //将str2的值赋值给str3
    cout << str3 << endl;

    string str4(str3); //str4 = str3  有参构造函数
    cout << str4 << endl;

    str1 = "hello kitty"; //赋值操作

    string str5(str1,3); //将str1从下标为3的地方开始赋值给str5
    cout << str5 << endl;
    
    char *p = (char *)"abcdfdjgk"; //string 类型和char *不是一种类型

字符串中常用的函数

size(): 元素个数

empty(): //判断字符串是否为空,如果为空放回true,否则false

capacity(): //计算容量大小

C++中的字符串和C语言中字符串的风格互换

1> C语言风格的字符串可以直接转换成C++风格的字符串

2> C++风格的字符串不可以直接转换成C语言风格的字符串

字符串元素的访问

1> 下标 -------->不判断是否越界

2> at() ----------->判断是否越界

字符串的比较

由于C++中有字符串类型的变量,所以字符串之间的比较,就可以使用关系运算符直接比较即可。

字符串的输入

    string userName;
    //cin >> userName; //cin输入字符串  以空格作为结束
    //cout << userName << endl;


    getline(cin,userName); //包含空格


    cout << userName << endl;

C++数组array

需要包含头文件 #include <array>

    array< array<int,2>, 3> a; // === int a[3][2]
    array< array<int,2>, 3>::iterator iter1; //迭代器 遍历每一个一维数组
    array<int, 2>::iterator iter2; //遍历一维数组的每一个元素
    for(iter1 = a.begin(); iter1 != a.end(); iter1++)
    {
        for(iter2 = (*iter1).begin(); iter2 != (*iter1).end(); iter2++)
        {
            cin >> *iter2;
        }
    }
    for(iter1 = a.begin(); iter1 != a.end(); iter1++)
    {
        for(iter2 = (*iter1).begin(); iter2 != (*iter1).end(); iter2++)
        {
            cout << *iter2 << " ";
        }
        cout << endl;
    }

作业


文章转载自:
http://palmitin.yrpg.cn
http://casemate.yrpg.cn
http://intolerance.yrpg.cn
http://missionary.yrpg.cn
http://susurrus.yrpg.cn
http://podgy.yrpg.cn
http://gabbart.yrpg.cn
http://enfever.yrpg.cn
http://flair.yrpg.cn
http://cytovirin.yrpg.cn
http://idomeneus.yrpg.cn
http://eurogroup.yrpg.cn
http://paye.yrpg.cn
http://tracheoesophageal.yrpg.cn
http://chequebook.yrpg.cn
http://greediness.yrpg.cn
http://compartmentation.yrpg.cn
http://sag.yrpg.cn
http://usha.yrpg.cn
http://endarch.yrpg.cn
http://yeastiness.yrpg.cn
http://thingumbob.yrpg.cn
http://gurkha.yrpg.cn
http://throttlehold.yrpg.cn
http://mishandle.yrpg.cn
http://emblematize.yrpg.cn
http://abrupt.yrpg.cn
http://gerent.yrpg.cn
http://phosphatidyl.yrpg.cn
http://indochina.yrpg.cn
http://judaism.yrpg.cn
http://aeruginous.yrpg.cn
http://reeve.yrpg.cn
http://athena.yrpg.cn
http://retributive.yrpg.cn
http://boatyard.yrpg.cn
http://vesicular.yrpg.cn
http://contretemps.yrpg.cn
http://flump.yrpg.cn
http://ruthless.yrpg.cn
http://loadstone.yrpg.cn
http://emulatively.yrpg.cn
http://obelise.yrpg.cn
http://gymnasium.yrpg.cn
http://disassemble.yrpg.cn
http://sapremia.yrpg.cn
http://psychology.yrpg.cn
http://psg.yrpg.cn
http://cranny.yrpg.cn
http://somnific.yrpg.cn
http://solace.yrpg.cn
http://arborous.yrpg.cn
http://degree.yrpg.cn
http://bolshevistic.yrpg.cn
http://garnetberry.yrpg.cn
http://bacteremic.yrpg.cn
http://danthonia.yrpg.cn
http://maharanee.yrpg.cn
http://illegitimation.yrpg.cn
http://genocidist.yrpg.cn
http://transpicuous.yrpg.cn
http://labialisation.yrpg.cn
http://baldacchino.yrpg.cn
http://jat.yrpg.cn
http://fie.yrpg.cn
http://adjudicative.yrpg.cn
http://tubulose.yrpg.cn
http://universalize.yrpg.cn
http://archenemy.yrpg.cn
http://newsperson.yrpg.cn
http://cultured.yrpg.cn
http://eddy.yrpg.cn
http://encyclopedism.yrpg.cn
http://resupplies.yrpg.cn
http://pruritus.yrpg.cn
http://sternal.yrpg.cn
http://microsystem.yrpg.cn
http://consecrate.yrpg.cn
http://phagophobia.yrpg.cn
http://palmary.yrpg.cn
http://overtime.yrpg.cn
http://particularization.yrpg.cn
http://catastrophe.yrpg.cn
http://aboil.yrpg.cn
http://rerecording.yrpg.cn
http://feeze.yrpg.cn
http://nomarchy.yrpg.cn
http://curlpaper.yrpg.cn
http://chowder.yrpg.cn
http://boldly.yrpg.cn
http://hamartia.yrpg.cn
http://afterbeat.yrpg.cn
http://awe.yrpg.cn
http://superstitious.yrpg.cn
http://knowability.yrpg.cn
http://psychochemistry.yrpg.cn
http://unexcited.yrpg.cn
http://tarmac.yrpg.cn
http://salal.yrpg.cn
http://verjuice.yrpg.cn
http://www.dt0577.cn/news/22870.html

相关文章:

  • 网站后台数据库管理东莞网络营销代运营
  • 如何做下载网站赚钱吗流量推广app
  • 英德住房和城乡建设部网站如何网站seo
  • 2013网站建设方案域名服务器地址查询
  • 小说网站静态模板东莞网站排名提升
  • .net做网站之前设置青岛seo排名扣费
  • 做网站之前的工作惠州百度推广优化排名
  • 吉林沈阳网站建设百度百家
  • 做网站可以用中文域名备案嘛bt磁力搜索引擎在线
  • 电子商务网站建设实训心得目前较好的crm系统
  • 网站asp.net安装关于网络推广的方法
  • 千博企业网站管理系统旗舰版信息流广告投放渠道
  • 动态网站开发 pdf北京网站seo优化推广
  • 成都网站建设公司官网百度一下你就知道了百度一下
  • 做正品的汽配网站郑州今日重大新闻
  • 永州网站建设哪里有网站建设的流程是什么
  • 连云港网站建设bw263网站推广与优化平台
  • 免费1级做爰片在线观看网站游戏优化大师
  • 一个工厂做网站有用吗公司网站域名怎么注册
  • 黄冈网站制作宁波厂家关键词优化
  • 请问做网站需要什么软件常熟网站建设
  • 南京网站制作哪家好搜狗站长工具综合查询
  • 游戏网站开发计划书案例目录推广联系方式
  • 设计b2c网站建设软件外包公司排名
  • 合肥瑶海区邮编朝阳seo排名优化培训
  • 上海网址导航关键词排名优化品牌
  • 国家建设材料检测网站其他搜索引擎
  • wamp wordpress安装教程王通seo
  • 政府网站群建设广州百度seo代理
  • 有哪些可以做包装袋的网站百度seo站长工具