当前位置:网站首页>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 :

边栏推荐
- 22-06-28 西安 redis(02) 持久化机制、入门使用、事务控制、主从复制机制
- 注解简化配置与启动时加载
- How does unity fixedupdate call at a fixed frame rate
- Concurrent programming (V) detailed explanation of atomic and unsafe magic classes
- 第一个Servlet
- Unity multi open script
- Analysis of Alibaba canal principle
- 【Rust 笔记】12-闭包
- TP5 multi condition sorting
- Eating fruit
猜你喜欢
![[concurrent programming] Table hopping and blocking queue](/img/b7/023991a00956e469af855e7a81e126.jpg)
[concurrent programming] Table hopping and blocking queue

Sending and receiving of request parameters

Unity editor expansion - controls, layouts

UE4 source code reading_ Bone model and animation system_ Animation node

Concurrent programming (VI) ABA problems and solutions under CAS

Notes and bugs generated during the use of h:i:s and y-m-d

Vscode, idea, VIM development tool shortcut keys

22-06-28 西安 redis(02) 持久化机制、入门使用、事务控制、主从复制机制
![[redis] redis persistent RDB vs AOF (source code)](/img/57/b6a86c49cedee31fc00dc5d1372023.jpg)
[redis] redis persistent RDB vs AOF (source code)
![[set theory] order relation (total order relation | total order set | total order relation example | quasi order relation | quasi order relation theorem | bifurcation | quasi linear order relation | q](/img/76/6561a78b7f883a0e75a53e037153c3.jpg)
[set theory] order relation (total order relation | total order set | total order relation example | quasi order relation | quasi order relation theorem | bifurcation | quasi linear order relation | q
随机推荐
MySQL containerization (1) docker installation MySQL
Dom4j traverses and updates XML
Apache startup failed phpstudy Apache startup failed
Markdown learning
too many open files解决方案
Redux - learning notes
Deep parsing JVM memory model
Servlet的生命周期
Unity editor expansion - window, sub window, menu, right-click menu (context menu)
[concurrent programming] concurrent security
Analysis of Alibaba canal principle
Unity interactive water ripple post-treatment
[concurrent programming] concurrent tool class of thread
UE4 source code reading_ Mobile synchronization
[rust notes] 12 closure
UE4 source code reading_ Bone model and animation system_ Animation compression
Constraintlayout's constraintset dynamically modifies constraints
Life cycle of Servlet
Markdown directory generation
The method for win10 system to enter the control panel is as follows: