우리는 다음과 같은 기능을 가지고 있다고 가정 해 봅시다.C++ difference between - k [i] and k [i] -
void f(int *k){
k++; //increments the pointer to the second element
(--(*k)); //what exactly does is mean?
}
int main(){
v[]={1,2,3};
f(v); //passes the pointer to the forst elemento of v
}
어떤 순서로 진행됩니까? void f(int k[3])
과 같은 함수에 --k[1]
이 있으면 어떻게됩니까? 그것의 첫 번째 요소 -
C++ 운영자 우선 순위 : http://en.cppreference.com/w/cpp/language/operator_precedence –
downvoters가 설명 할 수있는 경우 .. – Benoit
[C, C++, Java, C#] (http://stackoverflow.com/questions/6457130/pre-post-increment-operator-behavior-in-cc-java-c-sharp) – flaviodesousa