Friday, September 25, 2020

C++ namespace example

C++ namespace example

    basic concepts

  1. Namespaces on cppreference.com
  2. Structs and Classes
  3. Struct declaration
  4. C++ keywords: struct
  5. Struct and union initialization
  6. Struct declaration
  7. Const
  8. C++ keywords: const
  9. const type qualifier
  10. const type qualifier
  11. Reference declaration
  12. Reference initialization
  13. References
  14. Language linkage
  15. Declarations
  16. Variable Scope
  17. C++ reference
  18. C++ Standard Library headers
  19. constexpr specifier (since C++11)
  20. constexpr (C++)
  21. Understanding constexpr specifier in C++
  22. Initializer Lists In C++
  23. Storage class specifiers
  24. static members
  25. static_assert declaration
  26. std::static_pointer_cast, std::dynamic_pointer_cast,
  27. static_cast conversion

  28. more examples to deepen understanding

  29. Namespace in C++ | Set 1 (Introduction)
  30. tested

  31. namespace in C++ | Set 2 (Extending namespace and Unnamed namespace)
  32. tested

  33. Namespace in C++ | Set 3 (Accessing, creating header, nesting and aliasing)
  34. tested

  35. MODULE 23 - C++ NAMESPACES TUTORIAL 1
  36. tested

  37. MODULE 23a - C++ NAMESPACES 2
  38. tested

  39. 6.2 — User-defined namespaces
  40. tested

    In applications, namespaces can be used to separate application-specific code from code that might be reusable later (e.g. math functions). For example, physical and math functions could go into one namespace (e.g. math::). Language and localization functions in another (e.g. lang::).

    When you write a library or code that you want to distribute to others, always place your code inside a namespace. The code your library is used in may not follow best practices -- in such a case, if your library’s declarations aren’t in a namespace, there’s an elevated chance for naming conflicts to occur. As an additional advantage, placing library code inside a namespace also allows the user to see the contents of your library by using their editor’s auto-complete and suggestion feature.

  41. Using namespaces properly
  42. tested

  43. using / namespace
  44. New Class (C++) Wizard with namespaces selection
  45. Creating and Using Namespace in C++
  46. Namespace In C++ Example | C++ Namespace Tutorial
  47. Namespaces In C++
  48. External Namespaces Sometimes when we have too many namespaces to use in our application, we might want to place all the namespaces in a separate file. This can be easily done. When the namespaces are in the separate file we just include that file in our program and then directly use the namespaces and its contents in our program.

  49. How to use C++ Namespaces with an Example Code
  50. Namespaces in C++
  51. tested

  52. Namespaces
  53. Learn C++ Namespace with Syntax and Example in just 4 Mins!
  54. Everything You Need to Know about Namespace in C++
  55. Coupling and Cohesion
  56. code of damned:: very good website to review regularly
  57. C++: Pointers - Part 1
  58. Fundamentals of C++: Introduction to Templates

No comments:

Post a Comment