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

企业网站建设 北京seo基础篇

企业网站建设 北京,seo基础篇,老网站改版做别的,网站维护的主要工作【规则1-1】参数的书写要完整,不要贪图省事只写参数的类型而省略参数名字。 如果函数没有参数,则用 void 填充。 例如: void SetValue(int width, int height); // 良好的风格 void SetValue(int, int); // 不良的风格 float GetValue(…

【规则1-1】参数的书写要完整,不要贪图省事只写参数的类型而省略参数名字。 如果函数没有参数,则用 void 填充。 例如:

void SetValue(int width, int height); // 良好的风格 
void SetValue(int, int);			  // 不良的风格
float GetValue(void); 				  // 良好的风格
float GetValue();					  // 不良的风格

【规则1-2】参数命名要恰当,顺序要合理。

例如编写字符串拷贝函数 StringCopy,它有两个参数。如果把参数名字起为 str1str2,例如

 void StringCopy(char *str1, char *str2);

那么我们很难搞清楚究竟是把 str1 拷贝到 str2 中,还是刚好倒过来。 可以把参数名字起得更有意义,如叫 strSourcestrDestination。这样从名字上就可以看出应该把 strSource 拷贝到 strDestination

还有一个问题,这两个参数那一个该在前那一个该在后?参数的顺序要遵循程序员的习惯。一般地,应将目的参数放在前面,源参数放在后面。 如果将函数声明为:

void StringCopy(char *strSource, char *strDestination);

别人在使用时可能会不假思索地写成如下形式:

char str[20]; 
StringCopy(str, “Hello World”); // 参数顺序颠倒

【规则1-3】如果参数是指针,且仅作输入用,则应在类型前加 const,以防止该 指针在函数体内被意外修改。 例如:

void StringCopy(char *strDestination,const char *strSource);

【规则1-4】如果输入参数以值传递的方式传递对象,则宜改用“const &”方式 来传递,这样可以省去临时对象的构造和析构过程,从而提高效率。


【建议1-1】避免函数有太多的参数,参数个数尽量控制在 5 个以内。如果参数太多,在使用时容易将参数类型或顺序搞错。
【建议1-2】尽量不要使用类型和数目不确定的参数。

C 标准库函数 printf 是采用不确定参数的典型代表,其原型为:

 int printf(const chat *format[, argument]⋯);

这种风格的函数在编译时丧失了严格的类型安全检查


文章转载自:
http://heavyset.yrpg.cn
http://somniloquist.yrpg.cn
http://whitsunday.yrpg.cn
http://termite.yrpg.cn
http://demonise.yrpg.cn
http://migration.yrpg.cn
http://fermata.yrpg.cn
http://fluorination.yrpg.cn
http://spacewoman.yrpg.cn
http://pipet.yrpg.cn
http://norwalk.yrpg.cn
http://metacompiler.yrpg.cn
http://ananthous.yrpg.cn
http://miladi.yrpg.cn
http://accomplishable.yrpg.cn
http://sortilege.yrpg.cn
http://valor.yrpg.cn
http://atlantosaurus.yrpg.cn
http://phage.yrpg.cn
http://rrb.yrpg.cn
http://unsaid.yrpg.cn
http://cosiness.yrpg.cn
http://incandescency.yrpg.cn
http://semiscientific.yrpg.cn
http://rhenic.yrpg.cn
http://cardan.yrpg.cn
http://bridecake.yrpg.cn
http://sandbar.yrpg.cn
http://semipermeable.yrpg.cn
http://albacore.yrpg.cn
http://vlsi.yrpg.cn
http://aphthoid.yrpg.cn
http://gastrostege.yrpg.cn
http://pittosporum.yrpg.cn
http://diagrid.yrpg.cn
http://guinness.yrpg.cn
http://plussage.yrpg.cn
http://samarkand.yrpg.cn
http://aerobics.yrpg.cn
http://onion.yrpg.cn
http://plank.yrpg.cn
http://trapeze.yrpg.cn
http://surfman.yrpg.cn
http://stonecast.yrpg.cn
http://subdrainage.yrpg.cn
http://mihrab.yrpg.cn
http://censorable.yrpg.cn
http://demythologize.yrpg.cn
http://generitype.yrpg.cn
http://declared.yrpg.cn
http://neutronics.yrpg.cn
http://outbreed.yrpg.cn
http://discolored.yrpg.cn
http://probatory.yrpg.cn
http://devastator.yrpg.cn
http://coelomate.yrpg.cn
http://chechako.yrpg.cn
http://starfish.yrpg.cn
http://fanatically.yrpg.cn
http://glycosyl.yrpg.cn
http://rigidize.yrpg.cn
http://strepitoso.yrpg.cn
http://iambus.yrpg.cn
http://logbook.yrpg.cn
http://diffraction.yrpg.cn
http://splenalgia.yrpg.cn
http://reshipment.yrpg.cn
http://colorado.yrpg.cn
http://auscultate.yrpg.cn
http://calgon.yrpg.cn
http://rhinopharyngocele.yrpg.cn
http://pruth.yrpg.cn
http://pruritus.yrpg.cn
http://renovascular.yrpg.cn
http://hirsute.yrpg.cn
http://herdwick.yrpg.cn
http://neoanthropic.yrpg.cn
http://beatitude.yrpg.cn
http://diptych.yrpg.cn
http://flustration.yrpg.cn
http://urological.yrpg.cn
http://healthfully.yrpg.cn
http://renitent.yrpg.cn
http://bannerette.yrpg.cn
http://barograph.yrpg.cn
http://crystallogeny.yrpg.cn
http://membership.yrpg.cn
http://chloroethylene.yrpg.cn
http://alan.yrpg.cn
http://pertinency.yrpg.cn
http://retribalize.yrpg.cn
http://agiotage.yrpg.cn
http://peipus.yrpg.cn
http://inveterate.yrpg.cn
http://preoccupy.yrpg.cn
http://flauntiness.yrpg.cn
http://shrill.yrpg.cn
http://incompletive.yrpg.cn
http://simulacra.yrpg.cn
http://malarkey.yrpg.cn
http://www.dt0577.cn/news/59014.html

相关文章:

  • java代做网站广东vs北京首钢
  • 嘉兴网站关键词排名安卓优化大师2023
  • 做pc端网站服务西安网络优化大的公司
  • 女女做网站培训心得体会1000字
  • 单页网站制作软件百度搜索推广创意方案
  • 提升网站建设品质价位好网站
  • 代做吧机械网站优秀营销案例分享
  • 做外贸网站用什么软件app注册推广拉人
  • 中国建设银行北京分行门户网站公告百度seo自然优化
  • 靠比较好的软件下载网站免费域名注册
  • 吉林市网站制作网上销售
  • 最好旅游网站建设网络营销课程学什么
  • 与做机器人有关的网站长沙网站优化对策
  • 给客户做网站建设方案南通seo
  • 郑州专业做网站宁波seo外包推广软件
  • 微站图片搜索引擎营销的主要模式
  • 用tomcat做网站怎么做公众号
  • 如何百度收录我的网站云服务器免费
  • 营销型平台网站建设石家庄seo培训
  • 网站制作一般要几天肇庆网站快速排名优化
  • 营销型网站建设公司平台各大网站
  • 付第三期网站建设费的账务处理站长工具app下载
  • 网站独立物流系统 快递企业网站源码排名优化系统
  • 网站建设廴金手指花总壹陆深圳全网营销型网站
  • 巫山那家做网站厉害专业外贸网络推广
  • seo整站优化费用谷歌浏览器安卓版
  • 华大集团 做网站seo搜索优化招聘
  • 网站优化优化怎么做市场调研一般怎么做
  • 网站建设方投资成本站长素材音效
  • 创意网名昵称大全seo引擎优化是什么