C++ 包含和导入的区别

2021-12-22 00:00:00 gcc import visual-c++ include c++

#include#import 在 C++ 中有什么区别?

What is the difference between #include and #import in C++?

推荐答案

#import 是 Microsoft 特定的东西,显然仅适用于 COM 或 .NET 的东西.

#import is a Microsoft-specific thing, apparently for COM or .NET stuff only.

#include 是标准的 C/C++ 预处理器语句,用于在源代码文件中包含头文件(或其他源代码).

#include is a standard C/C++ preprocessor statement, used for including header (or occasionally other source code) files in your source code file.

相关文章