#pragma once
Specifies that the file, in which the pragma resides, will be included (opened) only once by the compiler in a build. A common use for this pragma is the following:一個是讓編譯器只打開一次文件,而如果只有#ifndef #define …#endif 的話,雖然編譯器只編譯一次頭文件,但是他還是會打開這個文件N多次。
———————-
#pragma是一種編譯
#pragma data_seg(".mdata")…..#pragma data_seg()可以讓編譯器把兩者之間的所有已初始化變量放入一個新的.mdata段中。
而#pragma once的意思是要求編譯器在編譯過程中只將包含此命令文件編譯(打開)一次,從而避免重復(fù)包含此文件。