Texonom
Texonom
/
Engineering
Engineering
/Software Engineering/Programming/Programming Language/Programming Languages/4GL/C++/CPP Grammar/CPP variable keyword/c++ assign/
c++ const
Search
c++ const

c++ const

할당과 선언 동시, 변경 안됨

 
만약 상수가 아닌 포인터가 상수 변수를 가리킨 다음에 역참조하여 값을 바꿀 수 있다면, const의 의도를 위반하게 되므로 상수가 아닌 포인터는 상수 변수를 가리킬 수 없다.
c++ const pointer
 
C++ 07.14 - 포인터와 const (pointer and const)
포인터와 const (pointer and const) Pointing to const variables 지금까지 보았던 모든 포인터는 상수(const)가 아닌 값을 가리키는 비-상수(non-const) 포인터다. int value = 5; int* ptr = &value; *ptr = 6;..
C++ 07.14 - 포인터와 const (pointer and const)
https://boycoding.tistory.com/206
C++ 07.14 - 포인터와 const (pointer and const)
  • member method const
메소드 정의 맨 뒤에 붙는 const는 왜 쓰나요?
조회수 6107회 이거 왜 쓰는 거에요?
메소드 정의 맨 뒤에 붙는 const는 왜 쓰나요?
https://hashcode.co.kr/questions/143/%EB%A9%94%EC%86%8C%EB%93%9C-%EC%A0%95%EC%9D%98-%EB%A7%A8-%EB%92%A4%EC%97%90-%EB%B6%99%EB%8A%94-const%EB%8A%94-%EC%99%9C-%EC%93%B0%EB%82%98%EC%9A%94
메소드 정의 맨 뒤에 붙는 const는 왜 쓰나요?
 
  • variable const
 
 
boycoding.tistory.com
https://boycoding.tistory.com/167
 
 
 
 

 

Recommendations

Texonom
Texonom
/
Engineering
Engineering
/Software Engineering/Programming/Programming Language/Programming Languages/4GL/C++/CPP Grammar/CPP variable keyword/c++ assign/
c++ const
Copyright Seonglae Cho