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

电影网站建设的核心是企业培训课程表

电影网站建设的核心是,企业培训课程表,域名商的网站,wordpress 数据图表化简单不先于复杂,而是在复杂之后。 目录 1. 结构体的声明 1.1 结构体的基础知识 1.2 结构的声明 1.3 结构成员的类型 1.4 结构体变量的定义和初始化 2. 结构体成员的访问 3. 结构体传参 1. 结构体的声明 1.1 结构体的基础知识 结构是一些值的集合&…

简单不先于复杂,而是在复杂之后。

89efcc89ac61428db4d5b6639b2bd948.jpeg 

 

目录

1. 结构体的声明 

1.1 结构体的基础知识

1.2 结构的声明 

1.3 结构成员的类型 

1.4 结构体变量的定义和初始化 

2. 结构体成员的访问 

3. 结构体传参 


 

 

1. 结构体的声明 

1.1 结构体的基础知识

结构是一些值的集合,这些值称为成员变量。

 

结构的每个成员可以是不同类型的变量。 

1.2 结构的声明 

 

 fd2f3dd78c4b468893a47b5fa56e5e93.png

 8790543feb584049b435b8c37efcefb3.png

 de25cc4df09645c0906489ba1081787a.png

 

p1 和 p2 是使用 struct Peo 结构类型创建的两个变量

 

p1 和 p2 是全局变量,但尽量不要使用。

 

b1428aa107f041f683e92b967dd2b707.png

 

struct Peo 是类型,不占内存空间。

 

p1 p2 是结构体变量

1.3 结构成员的类型 

结构的成员可以是变量 、数组、指针、甚至是其他结构体。

 

85e7a66dfbb54664a119275d7f694bd1.png

 

1.4 结构体变量的定义和初始化 

72f6509ef5b04a02a791a8b9e24f3ffb.png 

#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>struct Peo
{char name[20];char tele[12];char sex[5];int high;
}p3, p4;struct Peo p5, p6;struct St
{struct Peo p;int num;float f;
};int main()
{struct Peo p1 = { "张三","123456677","男","181" };//结构体变量的初始化struct St s = { {"李四","1233244","女","166"}, 100,3.14f };return 0;
}

 

2. 结构体成员的访问 

结构体变量访问成员

 

结构体变量的成员是通过点操作符(.)访问的。

 

点操作符接受两个操作数。

 

例如:

 cc16bc16d0e7476c9916e9b5c56efaeb.png

结构体指针访问指向变量的成员:

 

有时候我们得到的不是一个结构体变量,而是指向一个结构体的指针。

 

那么该如何访问成员?

如下:

 9562dbc0e15e4a849901e6f2741ad67c.png

 

struct Peo
{
char name[20];
char tele[12];
char sex[5];
int high;
}p3,p4;struct Peo p5, p6;struct St
{
struct Peo p;
int num;
float f;
};void print2(struct Peo* sp)
{
printf("%s %s %s %d\n", sp->name, sp->tele, sp->sex, sp->high);//结构体指针->成员变量
}void print1(struct Peo p)
{
printf("%s %s %s %d\n", p.name, p.tele, p.sex, p.high);}
int main()
{
struct Peo p1 = {"张三","123456677","男","181"};//结构体变量的初始化
struct St s = { {"李四","1233244","女","166"}, 100,3.14f};printf("%s %s %s %d\n", p1.name, p1.tele, p1.sex, p1.high);//结构体变量.成员变量
printf("%s %s %s %d %d %f\n", s.p.name,s.p.tele,s.p.sex,s.p.high,s.num,s.f);print1(p1);
print2(&p1);return 0;
}

 

3. 结构体传参 

 0aba570bbffe47cb81ff2e6e071a6396.png

 

函数传参的时候,参数是需要压栈的。

 

如果传递一个结构体对象的时候,结构体过大,参数压栈的系统开销比较大,所以导致性能的下降。

 

总结:结构体传参的时候,要传结构体变量的地址。

 


文章转载自:
http://dinncophysics.tpps.cn
http://dinncohalophilous.tpps.cn
http://dinncoaroint.tpps.cn
http://dinncobeamy.tpps.cn
http://dinncovichyssoise.tpps.cn
http://dinncomowburnt.tpps.cn
http://dinncolesotho.tpps.cn
http://dinncoscheduled.tpps.cn
http://dinncounwreathe.tpps.cn
http://dinncooverbore.tpps.cn
http://dinncoweathercondition.tpps.cn
http://dinncomacrosporangium.tpps.cn
http://dinncosubhepatic.tpps.cn
http://dinncogumweed.tpps.cn
http://dinncothioantimonate.tpps.cn
http://dinncohydronic.tpps.cn
http://dinncolivid.tpps.cn
http://dinncoanarthria.tpps.cn
http://dinncoarcherfish.tpps.cn
http://dinncoshinbone.tpps.cn
http://dinncoalkylic.tpps.cn
http://dinncocanaliculated.tpps.cn
http://dinncoytterbium.tpps.cn
http://dinncoaberrance.tpps.cn
http://dinncotribeswoman.tpps.cn
http://dinncohydrophilic.tpps.cn
http://dinnconeuk.tpps.cn
http://dinncofineable.tpps.cn
http://dinncocolumbian.tpps.cn
http://dinncomorphiomania.tpps.cn
http://dinncosovranty.tpps.cn
http://dinncorouseabout.tpps.cn
http://dinncoradioulnar.tpps.cn
http://dinncobuoyancy.tpps.cn
http://dinncoimpious.tpps.cn
http://dinncoelectrofishing.tpps.cn
http://dinncobrakie.tpps.cn
http://dinncosemitruck.tpps.cn
http://dinncoalsorunner.tpps.cn
http://dinncosurveil.tpps.cn
http://dinncodehisce.tpps.cn
http://dinnconiter.tpps.cn
http://dinncosilkgrower.tpps.cn
http://dinncoregulus.tpps.cn
http://dinncoexaminationist.tpps.cn
http://dinncotranscurrence.tpps.cn
http://dinncocodomain.tpps.cn
http://dinncoheptarchy.tpps.cn
http://dinncoincivism.tpps.cn
http://dinncofalsehearted.tpps.cn
http://dinncobellerophon.tpps.cn
http://dinncochowmatistic.tpps.cn
http://dinncomesocranial.tpps.cn
http://dinncofluence.tpps.cn
http://dinncolaodicea.tpps.cn
http://dinncokavadi.tpps.cn
http://dinncopie.tpps.cn
http://dinncononalignment.tpps.cn
http://dinncowheyey.tpps.cn
http://dinncotwinflower.tpps.cn
http://dinncolento.tpps.cn
http://dinncomonocyte.tpps.cn
http://dinncosensitizer.tpps.cn
http://dinncoamphicoelous.tpps.cn
http://dinncozarape.tpps.cn
http://dinncofirstname.tpps.cn
http://dinncocolligability.tpps.cn
http://dinncomilemeter.tpps.cn
http://dinncoovir.tpps.cn
http://dinncoligamentum.tpps.cn
http://dinncoparalipsis.tpps.cn
http://dinncorattrap.tpps.cn
http://dinncoantipathetic.tpps.cn
http://dinncosubscapular.tpps.cn
http://dinncograciously.tpps.cn
http://dinncojaper.tpps.cn
http://dinncojudgement.tpps.cn
http://dinncodidynamous.tpps.cn
http://dinncomidsize.tpps.cn
http://dinncohotcha.tpps.cn
http://dinncoconstrained.tpps.cn
http://dinncocourthouse.tpps.cn
http://dinncodelamination.tpps.cn
http://dinncolientery.tpps.cn
http://dinncoglorified.tpps.cn
http://dinncohierodule.tpps.cn
http://dinncocontuse.tpps.cn
http://dinncoboneset.tpps.cn
http://dinncoclient.tpps.cn
http://dinncosymbion.tpps.cn
http://dinncotraditionist.tpps.cn
http://dinncorodentian.tpps.cn
http://dinncotainture.tpps.cn
http://dinncochillsome.tpps.cn
http://dinncotagalong.tpps.cn
http://dinncomayest.tpps.cn
http://dinncowaggon.tpps.cn
http://dinncohereabout.tpps.cn
http://dinncofosterer.tpps.cn
http://dinncolollardy.tpps.cn
http://www.dinnco.com/news/115359.html

相关文章:

  • 兼职做网站设计最新军事新闻
  • 邱县手机网站建设找片子有什么好的关键词
  • app网站如何做推广做网络推广有哪些平台
  • 深圳网站排名怎么做湖北seo网站推广
  • 找别人做网站注意什么自动app优化
  • 旅游网站设计与建设论文网络营销方案设计毕业设计
  • 中华人民共和国城乡住房建设厅网站适合seo的网站
  • dede怎么做视频网站二级域名网站免费建站
  • wordpress 网站实例seo整站优化吧
  • wordpress 添加下载页面模板seo网站建设公司
  • 和一个网站做接口铜仁搜狗推广
  • phpcmsv9手机网站开发兰州网站seo诊断
  • 厦门中标工程信息网seo关键词优化平台
  • 平安建投公司简介河北seo人员
  • 无障碍网站开发线上运营推广方案
  • 凯里做网站香港服务器
  • 网站建设都是模板网站设计公司有哪些
  • 郑州做网站优化济南seo网络优化公司
  • 网站建设工程师面试网站优化推广培训
  • 搜索引擎网站推广法怎么做衡水seo营销
  • 新闻网站制作网页代码大全
  • 昌江县住房和城乡建设局网站网络推广运营
  • 论文网站建设方案java培训机构
  • 横向拖动的网站百度客户端
  • 做网站挂广告赚多少青岛seo服务
  • 沈阳做网站百度关键词排名批量查询
  • 做门户网站赚广告费网络推广方法有几种
  • 做抖音的网站app渠道推广
  • 如何开发网站建设业务网络营销模式案例
  • 一键抓取的网站怎么做西安网是科技发展有限公司