博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C语言及程序设计进阶例程-9 预处理之文件包含
阅读量:6857 次
发布时间:2019-06-26

本文共 559 字,大约阅读时间需要 1 分钟。

   

如何改造这个程序

#include 
typedef struct{ int month; int year;}DATE;int max(int x, int y);#define area(a, b) (a)*(b)double defaultPrice;int main(){ defaultPrice=1000; printf("%d\n", area(2,4)); ...}int max(int x, int y){ return (x>y)?x:y;}
源文件与头文件的分离
module.h
typedef struct{  int month;  int year;}DATE;int max(int x, int y);#define area(a, b) (a)*(b)double defaultPrice;
module.c
#include 
#include "module.h"int max(int x, int y){ return (x>y)?x:y;}int main(){ defaultPrice=1000; printf("%d\n", area(2,4)); return 0;}

转载地址:http://woiyl.baihongyu.com/

你可能感兴趣的文章
我的友情链接
查看>>
dubbo参数调优
查看>>
实验4 利用单臂路由实现VLAN间路由
查看>>
2、前端总线FSB和南桥与北桥
查看>>
SpringMVC 之@ModelAttribute
查看>>
java.lang.OutOfMemoryError: PermGen space及其解决方法
查看>>
redis 相关操作
查看>>
新近爆出的runc容器逃逸漏洞,用户如何面对?
查看>>
Thymeleaf教程 (九) 局部变量
查看>>
如何选择PHP项目的开发方案?
查看>>
java 面试题
查看>>
定时刷新 JS
查看>>
centos7 安装gitlab
查看>>
div+css实现的左右两个等高div
查看>>
Linux学习笔记-忘了第几天了:简单的用户管理命令
查看>>
教你3分钟搞定Linux正则表达式
查看>>
& 号和管道符号(|)在不同场景下的使用方法
查看>>
cssSourceMap: true 的作用
查看>>
app定位经纬度出现5e-324的情况
查看>>
是什么让程序员成了一份苦逼的工作?
查看>>