当前位置: 首页 > 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.zqtcl.cn/news/854693/

相关文章:

  • 做房地产一级市场的看什么网站网络营销外包推广方式
  • 网站建设基本流程包括哪几个步骤网站建设策划书网站发布与推广
  • 徐州整站优化手机网页端
  • 深圳中瑞建设集团官方网站宁波seo快速优化教程
  • 福田网站制作哪家好昆山企业网站建设公司
  • wordpress快六安网站自然排名优化价格
  • 网站的线下推广怎么做的系统官网网站模板下载安装
  • 北京网站优化推广公司企业网站建设费怎么核算
  • 网站建设vps个人如何做网站推广
  • 小语种网站怎么设计网页制作公司 大连
  • 贵港市城乡住房建设厅网站菜鸟教程网站
  • 广州网站建设找哪家免费搭建网站的软件
  • 培训班管理系统 免费太原优化网站排名
  • 上海怎么做网站网站让图片充满屏幕怎么做
  • 哈尔滨营销网站建设wordpress 加载图片不显示
  • 电商网站功能结构图网站做中秋专题怎么弄
  • 深圳专业建站平台陕西省建设工程质量安全监督总站网站
  • 制作网页的网站的软件是用户反馈数据分析软件园
  • 南京 做网站seo查询网站
  • 卖高仿名牌手表网站共享wifi小程序搭建
  • c#网站开发模板想在意大利做购物网站
  • 2015做那些网站能致富60天做网站
  • 沈阳个人建站模板网站图片计时器怎么做
  • 福州定制网站开发北京排名seo
  • 地方门户网站开发方案长沙有哪个学校可以学网站建设
  • 建个购物网站水果建设网站前的市场分析
  • 建网站的目的小程序登录代码
  • 南京有名的网站建设公司自学室内装修设计教程
  • 新乡市做网站的公司开发公司简介企业介绍
  • 礼品网站模板淘宝店铺购买交易平台