#include <iostream>
using namespace std;

class Something
{
public:
    //static int m_value = 1; static 멤버 변수는 초기화를 할 수 없다.
    //static const int s_value = 1; 과 같이 const로 쓰면 초기화 가능 대신 값은 못바꿈.
    static int s_value;
    
};

int Something::s_value = 1; // cpp 파일 안에 정의 하는 것이 좋다. 중복 선언되지 않도록 조심.


int main()
{
    cout << &Something::s_value << " " << Something::s_value << "\n" ; // static이라서 바로 접근이 가능하다!
    
    Something st1;
    Something st2;
    
    st1.m_value = 2;
    
    cout << &st1.s_value << " " << st1.s_value << "\n";
    cout << &st2.s_value << " " << st2.s_value << "\n"; // s_value의 값과 주소가 같다.
    
  	  
    
    
}