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



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

Answer / Mukesh Kumar Prajapat

In C++, `#include` directive brings the entire contents of the included file into the current source file. On the other hand, `#import` is not a standard preprocessor command but is provided by some C++ compilers. It includes the header file and also manages symbol renaming to avoid name clashes. The main difference between them is how they handle namespaces and symbols.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is a pointer with example?

1 Answers  


What are the various operations performed on stack?

1 Answers  


Can we make copy constructor private in c++?

1 Answers  


What is the basic structure of c++ program?

1 Answers  


How to avoid changing constant values?

2 Answers   Symphony,


What is a local variable?

1 Answers  


What is a custom exception?

1 Answers  


Why do we use iterators?

1 Answers  


What is & in c++ function?

1 Answers  


What is prototype in c++ with example?

1 Answers  


Explain static and dynamic memory allocation with an example each.

1 Answers  


How do you invoke a base member function from a derived class in which you’ve overridden that function?

1 Answers  


Categories