Created
August 12, 2017 07:30
-
-
Save j2doll/81e2a562c10a211623fd5270cc426987 to your computer and use it in GitHub Desktop.
constparam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// constparam | |
// 읽기(R) 쓰기(W) 인자. read/write paramter. | |
void refparam(int& param) | |
{ | |
param = 10; | |
} | |
// 읽기전용 인자를 const로 설정. set the read-only parameter to const type. | |
void constparam(const int& param) | |
{ | |
// param = 10; // error: you cannot assign to a variable that is const | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment