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

中华住房和城乡建设厅网站dw对网站建设有哪些作用

中华住房和城乡建设厅网站,dw对网站建设有哪些作用,建设一个网站需要用到几个语言,工作总结及工作计划C语言进阶课程学习记录-第22课 - 条件编译使用分析 条件编译基本概念条件编译实验条件编译本质实验-ifdefinclude本质实验-间接包含同一个头文件解决重复包含的方法-ifndef实验-条件编译的应用小结 本文学习自狄泰软件学院 唐佐林老师的 C语言进阶课程#xff0c;图片全部来源… C语言进阶课程学习记录-第22课 - 条件编译使用分析 条件编译基本概念条件编译实验条件编译本质实验-ifdefinclude本质实验-间接包含同一个头文件解决重复包含的方法-ifndef实验-条件编译的应用小结 本文学习自狄泰软件学院 唐佐林老师的 C语言进阶课程图片全部来源于课程PPT仅用于个人学习记录 条件编译基本概念 条件编译实验 #include stdio.h#define C 1int main() {const char* s;#if( C 1 )s This is first printf...\n;#elses This is second printf...\n;#endifprintf(%s, s);return 0; }/*output: This is first printf...*/条件编译本质 实验-ifdef #include stdio.hint main() {const char* s;#ifdef Cs This is first printf...\n;#elses This is second printf...\n;#endifprintf(%s, s);return 0; }/*output: This is second printf...*/include本质 实验-间接包含同一个头文件 // global.h //#ifndef _GLOBAL_H_ //#define _GLOBAL_H_ int global 10;//D:\Users\cy\Test\global.h|4|error: redefinition of global|//#endif// test.h//#ifndef _TEST_H_ //#define _TEST_H_ #include global.h const char* NAME test.h; char* hello_world(){ return Hello world!\n;}//#endif#include stdio.h #include test.h #include global.hint main() {const char* s hello_world();int g global;printf(%s\n, NAME);printf(%d\n, g);return 0; }//error D:\Users\cy\Test\global.h|4|error: redefinition of global|// global.h #ifndef _GLOBAL_H_ #define _GLOBAL_H_ int global 10; #endif// test.h#ifndef _TEST_H_ #define _TEST_H_ #include global.h const char* NAME test.h; char* hello_world(){ return Hello world!\n;}#endif#include stdio.h #include test.h #include global.hint main() {const char* s hello_world();int g global;printf(%s\n, NAME);printf(%d\n, g);return 0; }/*output: test.h 10*/解决重复包含的方法-ifndef 实验-条件编译的应用 “product.h” #define DEBUG 1 #define HIGH 1#include stdio.h #include product.h#if DEBUG#define LOG(s) printf([%s:%d] %s\n, __FILE__, __LINE__, s) #else#define LOG(s) NULL #endif#if HIGH void f() {printf(This is the high level product!\n); } #else void f() { } #endifint main() {LOG(Enter main() ...);f();printf(1. Query Information.\n);printf(2. Record Information.\n);printf(3. Delete Information.\n);#if HIGHprintf(4. High Level Query.\n);printf(5. Mannul Service.\n);printf(6. Exit.\n);#elseprintf(4. Exit.\n);#endifLOG(Exit main() ...);return 0; }/*output: [D:\Users\cy\Test\test1.c:143] Enter main() ... This is the high level product! 1. Query Information. 2. Record Information. 3. Delete Information. 4. High Level Query. 5. Mannul Service. 6. Exit. [D:\Users\cy\Test\test1.c:159] Exit main() ...*/小结 通过编译器命令行能够定义预处理器使用的宏 条件编译可以避免重复包含头同一个头文件 条件编译是在工程开发中可以区别不同产品线的代码条件编译可以定义产品的发布版和调试版
http://www.pierceye.com/news/854693/

相关文章:

  • 网站备案 快递公司变更流程
  • 简单的做图网站wordpress加密授权
  • 哪里做网站域名不用备案新华舆情监测平台
  • 品牌工厂网站建设qt 网站开发
  • xxx网站建设规划家庭服务网站的营销策略
  • 哪里可以做宝盈网站江门百度seo公司
  • 电子商务的网站建设名词解释如何建立官网
  • 网站建设维护外包群排名优化软件
  • 苏州专业建设网站镇江网站建设找思创网络
  • 长春网站排名提升seo关键词推广多少钱
  • 头条网站怎么做的在网站上放广告
  • 网站建设费的会计分录wordpress c博客
  • 网站开发语言字典使用apmserv本地搭建多个网站
  • 建网站费用记账北京时间网站建设
  • 兴化网站开发佛山营销网站建设联系方式
  • 安居客官网网站天津 网站设计制作公司
  • seo建站优化价格表中山网站建设品牌
  • wp网站源码聊城市住房和城乡建设局网站首页
  • 个人博客网站总结买东西的网站
  • 兰州新区小程序建站网站的漂浮广告怎么做
  • 用vs代码做网站线上拓客渠道有哪些
  • 微信网站界面如何免费创建自己的平台
  • 电商设计一般都是做什么潍坊网站seo外包
  • 大城怎么样做网站雄安建设工程信息网站
  • 郑州网站建设方案服务安全狗iis版删了以后 网站打不开
  • 忻州网站制作jsp小型网站开发代码
  • 如何外贸网站推广wordpress默认主题哪个好
  • 设计网站推荐提升审美网站建设的公司
  • 张浦专业做网站网站建设案例百度云
  • 佛山网站如何制作网站建设公司哪家强