当前位置:网站首页>Format - C language project sub file
Format - C language project sub file
2022-07-03 08:50:00 【Cap07】
1. The header file (head.h):
// Declaration for storing functions
// The main function is to be quoted by other documents :#include"head.h"
#define _CRT_SECURE_NO_WARNINGS // If not defined here , If quoting this (head.h) Of cpp This definition should be used in the document , Then it needs define
#include<stdio.h> // If the header file is not referenced here , Then quote this (head.h) Of cpp Write your own reference in the document
void temp1();
void temp2();
2. Implementation of functions in header file (head.cpp):
// The main function is to realize the header file (head.h) The function in
#include"head.h" // Reference the header file (head.h) All definitions in , Include define, Referenced header file, etc .
void temp1() {
int x;
scanf("%d", &x);
printf("temp1\n");
temp2();
}
void temp2() {
printf("temp2\n");
}
3. The main program (c1.cpp):
//#define _CRT_SECURE_NO_WARNINGS // When the referenced header file (head.h) When this definition is included in , It can be deleted here
//#include<stdio.h> // When the referenced header file (head.h) When this header file is included in , It can be deleted here
#include"head.h" // quote head.h, Want to refer directly to all the contents of its definition , Indirect reference head.cpp
int main() {
temp1();
return 0;
}
4. Running results :
边栏推荐
- The method for win10 system to enter the control panel is as follows:
- 注解简化配置与启动时加载
- 单调栈-42. 接雨水
- 分配异常的servlet
- Simple demo of solving BP neural network by gradient descent method
- Notes and bugs generated during the use of h:i:s and y-m-d
- UE4 source code reading_ Bone model and animation system_ Animation compression
- [concurrent programming] atomic operation CAS
- createjs easeljs
- [concurrent programming] consistency hash
猜你喜欢
求组合数 AcWing 886. 求组合数 II
Life cycle of Servlet
Markdown learning
First Servlet
Constraintlayout's constraintset dynamically modifies constraints
Drawing maze EasyX library with recursive backtracking method
Query XML documents with XPath
UE4 source code reading_ Bone model and animation system_ Animation process
二进制转十进制,十进制转二进制
How to place the parameters of the controller in the view after encountering the input textarea tag in the TP framework
随机推荐
Collection interface
数据库原理期末复习
Location of package cache downloaded by unity packagemanager
OpenGL learning notes
ES6 promise learning notes
Notes and bugs generated during the use of h:i:s and y-m-d
Explain sizeof, strlen, pointer, array and other combination questions in detail
Unity Editor Extension - Outline
100 GIS practical application cases (78) - Multi compliance database design and data warehousing
Constraintlayout's constraintset dynamically modifies constraints
Monotonic stack -503 Next bigger Element II
796 · unlock
too many open files解决方案
如何应对数仓资源不足导致的核心任务延迟
Unity editor expansion - window, sub window, menu, right-click menu (context menu)
Get the link behind? Parameter value after question mark
Thymeleaf 404 reports an error: there was unexpected error (type=not found, status=404)
【Rust 笔记】11-实用特型
Graphics_ Learnopongl learning notes
Redux - learning notes