函数的间接声明(多文件)
This commit is contained in:
parent
8d952e19e7
commit
c371e8f6a7
73
3_lesson/03_fun_many_file/.gitignore
vendored
Normal file
73
3_lesson/03_fun_many_file/.gitignore
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
# This file is used to ignore files which are generated
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
*~
|
||||
*.autosave
|
||||
*.a
|
||||
*.core
|
||||
*.moc
|
||||
*.o
|
||||
*.obj
|
||||
*.orig
|
||||
*.rej
|
||||
*.so
|
||||
*.so.*
|
||||
*_pch.h.cpp
|
||||
*_resource.rc
|
||||
*.qm
|
||||
.#*
|
||||
*.*#
|
||||
core
|
||||
!core/
|
||||
tags
|
||||
.DS_Store
|
||||
.directory
|
||||
*.debug
|
||||
Makefile*
|
||||
*.prl
|
||||
*.app
|
||||
moc_*.cpp
|
||||
ui_*.h
|
||||
qrc_*.cpp
|
||||
Thumbs.db
|
||||
*.res
|
||||
*.rc
|
||||
/.qmake.cache
|
||||
/.qmake.stash
|
||||
|
||||
# qtcreator generated files
|
||||
*.pro.user*
|
||||
|
||||
# xemacs temporary files
|
||||
*.flc
|
||||
|
||||
# Vim temporary files
|
||||
.*.swp
|
||||
|
||||
# Visual Studio generated files
|
||||
*.ib_pdb_index
|
||||
*.idb
|
||||
*.ilk
|
||||
*.pdb
|
||||
*.sln
|
||||
*.suo
|
||||
*.vcproj
|
||||
*vcproj.*.*.user
|
||||
*.ncb
|
||||
*.sdf
|
||||
*.opensdf
|
||||
*.vcxproj
|
||||
*vcxproj.*
|
||||
|
||||
# MinGW generated files
|
||||
*.Debug
|
||||
*.Release
|
||||
|
||||
# Python byte code
|
||||
*.pyc
|
||||
|
||||
# Binaries
|
||||
# --------
|
||||
*.dll
|
||||
*.exe
|
||||
|
10
3_lesson/03_fun_many_file/03_fun_many_file.pro
Normal file
10
3_lesson/03_fun_many_file/03_fun_many_file.pro
Normal file
@ -0,0 +1,10 @@
|
||||
TEMPLATE = app
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG -= qt
|
||||
|
||||
SOURCES += main.c \
|
||||
myfun.c
|
||||
|
||||
HEADERS += \
|
||||
myfun.h
|
9
3_lesson/03_fun_many_file/main.c
Normal file
9
3_lesson/03_fun_many_file/main.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include <stdio.h>
|
||||
#include "myfun.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
myfun1();
|
||||
|
||||
return 0;
|
||||
}
|
10
3_lesson/03_fun_many_file/myfun.c
Normal file
10
3_lesson/03_fun_many_file/myfun.c
Normal file
@ -0,0 +1,10 @@
|
||||
#include "myfun.h" // 此时包含的头文件要使用双引号,在当前目录下找对应头文件
|
||||
|
||||
void myfun1()
|
||||
{
|
||||
printf("hello world\n");
|
||||
printf("nihao beijing\n");
|
||||
printf("welcome to 1000phone\n");
|
||||
|
||||
return ;
|
||||
}
|
6
3_lesson/03_fun_many_file/myfun.h
Normal file
6
3_lesson/03_fun_many_file/myfun.h
Normal file
@ -0,0 +1,6 @@
|
||||
#ifndef MYFUN_H
|
||||
#define MYFUN_H
|
||||
|
||||
void myfun1();
|
||||
|
||||
#endif // MYFUN_H
|
Loading…
x
Reference in New Issue
Block a user