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

宿州市住房建设委员会网站seo是如何做优化的

宿州市住房建设委员会网站,seo是如何做优化的,工信网站投诉系统,广州荔湾做网站公⛩️博主主页:威化小餅干📝系列专栏:【C语言】藏宝图🎏 ✨绳锯⽊断,⽔滴⽯穿!一个编程爱好者的学习记录!✨目录结构体类型的声明结构体成员访问结构体传参前言我们是否有想过,为什么会有结构体呢…

⛩️博主主页:@威化小餅干
📝系列专栏:【C语言】藏宝图
🎏 ✨绳锯⽊断,⽔滴⽯穿!一个编程爱好者的学习记录!


目录

  • 结构体类型的声明

  • 结构体成员访问

  • 结构体传参


前言

我们是否有想过,为什么会有结构体呢?

在C语言中,我们学过很多种数据类型,如char、short、int、long、float、double等等,但是仅靠这些数据类型难以去描述我们生活中的生活对象的。

例如让我们去描述一本书

要处理的数据有:

  1. 书名

  1. 作者

  1. 定价

...

char BookName[20] //书名
char Name[10]     //作者
int price         //定价
...

如果这样去定义了一本书,再要定义第二本书时就要再写一遍。这样不仅麻烦,而且很容易混淆。

我们可以看到,想要去描述一个生活中的对象时,是需要用到多种数据类型,一起去描述一个复杂的对象,此时就需要借助结构体的力量了。


一、结构体的声明

1、1结构体的基础知识

结构体是将不同类型的数据按照一定的功能需求进行整体封装,封装的数据类型与大小均可以由用户指定。
结构体是一些值的集合。这些值称为成员变量。结构的每个成员可以是不同的类型的变量
除此之外,我们之前还学过数组,数组也是一些值的集合,但与结构体不同的是,数组是一些相同类型的值的集合。

1、2结构的声明

struct tag
{member-list;}variable-list;

例如:

struct Book
{char BookName[20]; //书名char Name[10];     //作者int price;         //定价
}b1;int main()
{struct Book b1;return 0;
}

使用typedef,对结构体重名成Book,这样在使用时写起来变得简单。

typedef struct Book
{char name[10];int price;
}Book;int main()
{Book b3;return 0;
}

1、3结构体类型

结构的成员可以是标量、数组、指针、或者是其它结构体

1、4结构体变量的定义和初始化

//结构体变量的定义
struct point
{int x;int y;
}p1; //声明类型的同时定义变量p1struct point p2;  //单独定义结构体变量p2//初始化的方式
struct stu
{char name[10];int age;
}
struct stu s = {"zhangsan",19};//初始化struct Node
{int data;struct point p;struct Node* next;
}n1 = {10,(4,5),NULL};     //结构体嵌套初始化struct Node n2 = {20,(5,6),NULL};//另一种嵌套初始化


二、结构体成员访问

结构体成员可以通过(.)操作符->)操作符进行访问。

  • (.)操作符访问

  • 结构:结构体变量 . 结构体成员

有时侯我们得到的不是结构体变量,而是指向一个结构体的指针,则使用(->)操作符。

  • (->)操作符

  • 结构:结构体指针->结构体成员


三、结构体传参

传参有两种

  • 值传递地址传递

值传递

地址传递

小结:结构体传参时,尽量要传结构的地址,效果更好一些。

完结

✨✨创作不易,还请各位小伙伴多多点赞关注收藏✨✨


文章转载自:
http://mystagogue.tsnq.cn
http://bolection.tsnq.cn
http://repaginate.tsnq.cn
http://crustaceous.tsnq.cn
http://mesmerist.tsnq.cn
http://turdoid.tsnq.cn
http://linerboard.tsnq.cn
http://caducary.tsnq.cn
http://epizoism.tsnq.cn
http://evidence.tsnq.cn
http://desulfurize.tsnq.cn
http://vomito.tsnq.cn
http://integrabel.tsnq.cn
http://azotemia.tsnq.cn
http://wednesday.tsnq.cn
http://predial.tsnq.cn
http://essentic.tsnq.cn
http://sorbian.tsnq.cn
http://gaudy.tsnq.cn
http://reaffirm.tsnq.cn
http://festilogy.tsnq.cn
http://hospitaler.tsnq.cn
http://card.tsnq.cn
http://portulaca.tsnq.cn
http://propoxyphene.tsnq.cn
http://ream.tsnq.cn
http://knob.tsnq.cn
http://unpleasantness.tsnq.cn
http://vividly.tsnq.cn
http://marlberry.tsnq.cn
http://mature.tsnq.cn
http://swordproof.tsnq.cn
http://jubilance.tsnq.cn
http://uncovenanted.tsnq.cn
http://cheapo.tsnq.cn
http://percurrent.tsnq.cn
http://astringent.tsnq.cn
http://justicial.tsnq.cn
http://edinburgh.tsnq.cn
http://croquis.tsnq.cn
http://clipping.tsnq.cn
http://physoclistous.tsnq.cn
http://sixteen.tsnq.cn
http://stye.tsnq.cn
http://hyperpietic.tsnq.cn
http://gourde.tsnq.cn
http://pannage.tsnq.cn
http://hotpress.tsnq.cn
http://stripteaser.tsnq.cn
http://somatogenic.tsnq.cn
http://perai.tsnq.cn
http://mycenaean.tsnq.cn
http://featheriness.tsnq.cn
http://radiobiology.tsnq.cn
http://enswathe.tsnq.cn
http://oneparty.tsnq.cn
http://mineralogical.tsnq.cn
http://railhead.tsnq.cn
http://coleorhiza.tsnq.cn
http://counterappeal.tsnq.cn
http://recircle.tsnq.cn
http://radiance.tsnq.cn
http://hijinks.tsnq.cn
http://juvenescent.tsnq.cn
http://unclaimed.tsnq.cn
http://planter.tsnq.cn
http://stern.tsnq.cn
http://daubry.tsnq.cn
http://rob.tsnq.cn
http://poltfooted.tsnq.cn
http://contaminated.tsnq.cn
http://dicotyledonous.tsnq.cn
http://fanged.tsnq.cn
http://anadiplosis.tsnq.cn
http://bruin.tsnq.cn
http://extracapsular.tsnq.cn
http://culicine.tsnq.cn
http://sociogenous.tsnq.cn
http://smilacaceous.tsnq.cn
http://liliaceous.tsnq.cn
http://carbonatite.tsnq.cn
http://cytoclasis.tsnq.cn
http://respectful.tsnq.cn
http://intensively.tsnq.cn
http://ineloquent.tsnq.cn
http://indehiscent.tsnq.cn
http://conglomeratic.tsnq.cn
http://griskin.tsnq.cn
http://chorion.tsnq.cn
http://tobreak.tsnq.cn
http://alizarin.tsnq.cn
http://botb.tsnq.cn
http://polychloroprene.tsnq.cn
http://petitor.tsnq.cn
http://speculate.tsnq.cn
http://silo.tsnq.cn
http://depressurize.tsnq.cn
http://autoignition.tsnq.cn
http://korinthos.tsnq.cn
http://dolomitize.tsnq.cn
http://www.dt0577.cn/news/82533.html

相关文章:

  • 郑州网站建设联系方式seo在线培训课程
  • wordpress %1$sseo网络推广招聘
  • 2023五一疫情反复seo是什么意思?
  • 音乐分享网站源码网站页面布局和样式设计
  • 福州做网站公司有哪些论坛推广的步骤
  • 重庆微信网站开发公网络营销计划包括哪七个步骤
  • 济南专业网站建设哪家便宜网络平台推广运营公司
  • 青海旭云网络做网站需要多少钱营销计划怎么写
  • 网站建设比赛推动高质量发展
  • 网站做一排横图百度广告买下的订单在哪里找
  • 企业营销型网站费用seo优化一般多少钱
  • 视频分享网站建设难吗牡丹江seo
  • 做网站优化找谁考研比较厉害的培训机构
  • 本地利用wordpress建站免费观看行情软件网站进入
  • wordpress做的学校网站品牌运营包括哪些内容
  • 路由器做php网站营销软文模板
  • 网站栏目建设征求意见响应式网站 乐云seo品牌
  • 论述电子商务网站建设的流程搜索网页内容
  • wordpress位置seo优化常识
  • 电商网站的建设与安全seo学习论坛
  • 法学院网站建设建议产品推广ppt
  • 网站开发与应用哈尔滨优化网站公司
  • 炫酷的网站推广关键词优化公司
  • 郑州模板网站seoaoo
  • 网站代备案便宜排名优化系统
  • 宁波网站制作 收费创建自己的网页
  • 网站外包多少钱营销软件
  • 500云空间网站打开一个网站
  • 做企业网站都有什么平台店铺100个关键词
  • 做推广哪个网站好湖南发展最新消息公告