// 题目1 根据程序写结果
#include <cstdlib>
#include <iostream>
using namespace std;
class A
{
public:
A()
{
m_static++ ;
}
int getAValue()
{
return m_static ;
}
int getValue()
{
static int m_LocalStatic=0 ; // 静态变量 这种情况 还不多见
m_LocalStatic++ ;
return m_LocalStatic;
}
private :
static int m_static ;
} ;
int A::m_static = 0;
int main(int argc, char *argv[])
{
A a;
cout<<a.getAValue();
cout<<" "<<a.getValue()<<endl;
A b ;
cout<<b.getAValue();
cout<<" "<<b.getValue()<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}