c++ - What is the difference between header file and namespace? -


I want to know the exact difference between header files and namespace in the programming languages ​​?? The header files are actual files - files are stored in the file system, referenced by the file name, and

'in other files (at least, in other languages ​​using C / C ++ or M4 macro preprocessor) Header files are usually pieces of group group that all of the same specific item are dependent on each other. For example, a game can have a header file for all their graphic rendering. Namespace, on the other hand, is an element of the programming language - they are not present in the form of a file system object, but as a term within the code, informing the compiler that some things are that namespace Namespace usually consists of group interfaces (functions, classes / strokes, types) similar (but not necessarily dependent on each other) items, for example, in C ++ the std namespaces in all the standard Library c Including Ry and square.


Comments