Main.cc: In function 'int main()':
Main.cc:17:2: error: 'student' was not declared in this scope
student x[n];
^
Main.cc:19:15: error: 'x' was not declared in this scope
getline(cin,x[i].name);
^
Main.cc:22:7: error: 'x' was not declared in this scope
sort(x+0,x+n,cmp);
^
Main.cc:24:38: error: 'print' was not declared in this scope
print("%2.f,%s",x[i].jg,x[i].name);
^
Main.cc:25:9: error: expected primary-expression before '<<' token
cout<<<