第二章完结

This commit is contained in:
lzy
2024-03-12 22:05:13 +08:00
parent d64b6fe321
commit 0e9bf09117
15 changed files with 282 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
#include <stdio.h>
#include <stdlib.h>
#include "proj.h"
int i = 10;
int main()
{
printf("[%s]i=%d\n", __FUNCTION__, i);
func();
exit(0);
}

View File

@@ -0,0 +1,13 @@
#include <stdio.h>
#include <stdlib.h>
#include "proj.h"
extern int i;
// extern i;也是可以的,会有警告
void func(void)
{
printf("[%s]i=%d\n", __FUNCTION__, i);
exit(0);
}

View File

@@ -0,0 +1,5 @@
#ifndef PROJ_H___
#define PROJ_H___
void func(void);
#endif