Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f61bd62

Browse files
committed
➕ 좌측값에 대한 부연 설명 추가
1 parent 2e49034 commit f61bd62

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎6-pointers-and-array/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ C에선 식이 가질 수 있는 값을 `좌측값(lvalue)`과 `우측값(rvalue
100100

101101
대입 연산자의 왼쪽에 들어갈 수 있는 값은 바로 좌측값들입니다. 좌측값이라는 이름은 대입 연산자의 왼쪽에서 올 수 있다는 특징에서 유래했습니다. 마찬가지로 단항 연산자 `&`를 적용할 수 있는 식들은 결과값이 좌측값이어야 합니다. 다시 말해, `&(i + 1)`은 잘못된 식이지만, `&*p`는 올바른 식입니다.
102102

103+
초기화되지 않은 포인터에 참조 연산자를 사용해도 그 값은 좌측값입니다. 포인터가 어디를 가리키고 있는지는 모르겠지만, 결과값이 그 포인터가 가리키고 있는 공간에 들어있는 값이 되고, 결과값이 들어있는 주소를 포인터가 갖고 있는 주소로 특정할 수 있습니다.
104+
103105
> 여기서 `~의 결과값은`이란 표현은 제가 `~ is evaluated as`라는 표현을 번역한 것입니다.
104106
105107
> C++ 표준에선 식이 가질 수 있는 값을 lvalue, prvalue, xvalue, glvalue, rvalue 다섯가지로 구분합니다. 이것과 관련된 정확한 구분은 C++에 대해 배울 때 다루겠습니다.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /