angularjs ng-repeat可以含有表达式track by.
下面分析两个经典面试题。
l 例1:
class A
{
protected:
int m_data;
public:
A(int data = 0)
{
m_data = data;
}
int GetData()
{
return doGetData();
}
virtual int doGetData()
{
return m_data;
}
};
class B: public A
{
protected : int m_data;
public:
B(int data = 1)
{
m_data = data;
}
int doGetData()
{
return m_data;
}
};
class C : public B
{
protected : int m_data;
public :
C(int data = 2)
{
m_data = data;
}
};
int _tmain(int argc, _TCHAR* argv[])
{
C c(10);
cout<
}