相关疑难解决方法(0)

const int与int const作为C++和C中的函数参数

快速提问:

int testfunc1 (const int a)
{
  return a;
}

int testfunc2 (int const a)
{
  return a;
}
Run Code Online (Sandbox Code Playgroud)

这两个功能在每个方面都是相同的还是有区别的?我对C语言的答案感兴趣,但如果C++语言中有一些有趣的东西,我也想知道.

c c++ const

111
推荐指数
6
解决办法
9万
查看次数

标签 统计

c ×1

c++ ×1

const ×1