Sie sind auf Seite 1von 2

Q1. Difference between <> and The difference between the #includes <...> and #includes "...

." format is the order in which the compiler looks for files. This is generally implementation dependent, but the idea is that the <> format looks in system include directories first, while "" looks in the same directory as the source file that #included it first. 1 down vote

Typically <> is used for system or standard library files whereas "" is used for project files.
Q2. Difference between header files and Dynamic linking library (dll).

A header file is generally used to define an interface or set of interfaces within an application. Think of a header file as something which shows the external functionality of a program while omitting the technical implementation details. For example, if you were optimising a program, you would most likely modify the source (.cpp) file to improve the algorithm, but the header file wouldn't change, because external clients still call the methods using the same set of parameters and return values. In an object-oriented language like C++, a header file generally includes the following: Class description and inheritance hierarchy Class data members and types Class methods

While there is nothing stopping code from being implemented in a header file, this is generally not favoured as it can introduce extra coupling and dependencies in the code. In some cases (e.g. templated classes) the implementation must be defined in the header file for technical reasons. A library is a collection of code which you want to make available to a program or group of programs. It includes the implementation of a particular interface or set of interfaces. Code is defined in a library to prevent code duplication and encourage re-use. A library can be statically-linked (.lib) or dynamically-linked (.dll):

A statically-linked library defines a set of export symbols (which can be thought of as method definitions) which are then linked into the final executable (.exe) during the linking state of the build process. It has the advantage of faster execution time (as the library doesn't need to be dynamically loaded), at the expense of a larger binary (because the methods are essentially replicated in the executable file). A dynamically-linked library is linked during the execution of a program, rather than the linking of a program. It is useful when multiple programs need to re-use the same methods, and is used extensively in technologies such as COM.

mscorlib.dll
The mscorlib.dll Dynamic Link Library is a shared assembly, which consists of the very important base class libraries of .Net framework. The library is available to all languages using the .NET Framework in order to make the programmer's job easier. The mscorlib.dll program file included in the BCL encapsulates a large number of common functions, such as file reading

and writing, graphic rendering, database interaction, and XML document manipulation. The BCL is much bigger in scope than standard libraries for most other languages, including C++, and would be comparable in range to the standard libraries of Java. The DLL mscorlib.dll is used by programmers who combine it with their own code to produce applications. Applications written for the .NET Framework are executed in the software mscorlib.dll to manage the program's runtime requirements. This runtime environment, which is also a part of the .NET Framework, is known as the Common Language Runtime (CLR). Being a core dynamic link of the .Net Framework, the application mscorlib.dll is basic in Windows operations.

Das könnte Ihnen auch gefallen