to define a const, we can use const as well as #define in C++ .however the former has more benifits than later.
        1) const has data type ,however Macro has no. so the complier can check the data type for the former , but not for the later.
        2) some integrated tools can debug with const while not with macro. therefore we can use const completely taking place of Macro.

相关文章:

  • 2022-01-25
  • 2022-01-29
  • 2021-11-13
  • 2021-08-09
  • 2021-07-16
  • 2021-10-01
  • 2021-06-18
  • 2022-12-23
猜你喜欢
  • 2021-09-19
  • 2021-07-12
  • 2021-05-13
  • 2021-10-25
  • 2022-12-23
  • 2021-12-12
  • 2022-02-18
相关资源
相似解决方案