#include<iostream>
using namespace std;
class A
{
public:
A(int x)
{
a=x;
}
int a;
};
void fun(A temp)
{
cout<<temp.a<<endl;
}
int main()
{
fun(1);
}
在這裏,我們傳遞的原始值,以有趣的方法,並使用A級 的 對象任何人都可以解釋我如何上面的代碼工作,並使用其中的理念抓?任何人都可以解釋我如何上面的代碼工作和使用哪個概念?
這些都是很基本的概念,應該在任何好的[圖書]的第一章(覆蓋http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-列表) – user463035818
你是什麼意思「哪個概念」? –