当前位置: 代码迷 >> 综合 >> c和c++ 中的struct有什么不同
  详细解决方案

c和c++ 中的struct有什么不同

热度:71   发布时间:2024-02-10 20:37:52.0
  • c和c++ 中struct的主要区别是c中的struct不可以含有成员函数,而c++ 中的struct可以
  • c++ 中struct和class的主要区别在于默认的存取权限不同,struct默认为public ,而class默认为private
  相关解决方案