العربية  

books scrolling with cursors

If you do not find what you're looking for, you can use more accurate words.

View more

التمرير باستخدام المؤشرات (Info)


يُمكن استخدام المؤشرات لتمرير المتغيرات باستخدام مراجع لها، بما يسمح لقيمتها بأن تتغير، على سبيل المثال انظر إلى كود لغة C++ التالي:

/* a copy of the int n is changed */ void not_alter(int n) { n = 360; } /* the actual variable passed (by address) is changed */ void alter(int *n) { *n = 120; } void func(void) { int x = 24; /*pass x's address as the argument*/ alter(&x); /* x now equal to 120 */ not_alter(x); /* x still equal to 120 */ }

Source: wikipedia.org