Possible Duplicate:
C++ include and import difference
Can someone explain the difference and where may I use one versus the other?
The difference between two things is the way in which they are unlike each other. That is the fundamental difference between the two societies. [ + between] There is no difference between the sexes.
The most common use for among is when something is in or with a group of a few, several, or many things. The most common use of between is when something is in the middle of two things or two groups of things. It is sometimes used in the phrase in between.
Difference vs Different Different or difference is the quality or condition of being unlike or dissimilar. The only difference between these words is in its usage in English grammar. Difference is the noun, whereas different is an adjective.
#include
includes a file in the current compilation unit.#import
does not exist in the C++ standard.This answer was true in '14. However, the C++ standard has evolved since then and import
now exists. Without the #
.
#include
cause the referenced file to be "copy-and-pasted" at the current position during the preprocessing phase.
#import
is not in the C++
standard, but is an extension provided by some compiler. There is no consensus about what it does. For GCC, it is equivalent to #include
but try to ensure that the file has not already been included. For MSVC, it may have another meaning.
It is best to avoid #import
(sadly) if you want to write code portable to multiple compilers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With