#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에서는 에러가 뜨네요.

저 & 참조자 부분이..


도와주세요.