#include <stdio.h>
#include <stdlib.h>
void subpro( int &a, float b);
void main()
{
int a=10;
float b=-1;
printf("a=%d\n",a);
subpro(a,b);
printf("call by reference -> a=%d\n",a);
printf("call by value -> b=%f\n",b);
}
void subpro( int &x, float y)
{
printf("x=%d\n",x);
x=x+3;
y=y+1;
}
이 코드가 비주얼스튜디오에선 되는데
mac xcode에서는 에러가 뜨네요.
저 & 참조자 부분이..
도와주세요.
http://dblack.tk
커뮤니티 사이트 입니다 많은 이용 부탁 드립니다.