I cannot figure out why Xcode won't compile my code. It doesn't signify any normal syntax errors in main.cpp, but on the sidebar it displays what appears to be a different kind of error.
Undefined symbols for architecture x86_64:
"chopin(int, int, int, int)", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
#include <iostream>
usingnamespace std;
void chopin(int x, int y, int z, int q);
int main()
{
int a, b, c, d;
a = 45;
b = 7;
c = 12;
d = 90;
chopin(a, b, c, d);
cout << a << " " << b << " " << c << " " << d << endl;
return 0;
}
void chopin(int x, int& y, int z, int& q)
{
cout << x << " " << y << " " << z << " " << q << endl;
x = 5;
y = 6;
z = 7;
q = 8;
cout << x << " " << y << " " << z << " " << q << endl;
}