I'm learning Objective-C, and they use #import "File.h" instead of #include "File.h" . The tutorial I'm using says that import is like an include once thing, and it basically implements the #ifndef blocks that's normally done manually in C++. I was just wondering if this is something specific to Objective C, or if it's built into the C predecessor, and technically could be used with C++, but just isn't commonly.
No special standard features in C++ and C preprocessors to do it.
The #import preprocessor directive in MS Visual C++ has totally different semantics (strictly speaking, it's not preprocessor directive at all). There are another directives (for example, #pragma once) but they are not standard (portable) ones too.
There are Obj_C #import analogues in some other languages (in PHP, for example), but no such directive in C and C++.
It's a common case, Object-C != C++...
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.