I'm trying to return reference to variable in c code, however this code:
int& f()
{
static int l = 10;
return l;
}
doesn't compile via gcc:
main.c:5:4: error: expected identifier or ‘(’ before ‘&’ token
int& f()
But compiles well with g++. How can I achieve this in c?