#:preprocessor
#ifndef:檢查是否已經定義過
用法:
#ifndef <標識>
如果標識要表示header file,要『全大寫』、『.』要變成『_』、前後都要加『_』
範例:stdio.h
#ifndef _STDIO_H_
#define _STDIO_H_
#:preprocessor
#ifndef:檢查是否已經定義過
用法:
#ifndef <標識>
如果標識要表示header file,要『全大寫』、『.』要變成『_』、前後都要加『_』
範例:stdio.h
#ifndef _STDIO_H_
#define _STDIO_H_
转载于:https://www.cnblogs.com/dforce/articles/1790654.html