I'm struggling to get my own functions defined. While not strictly necessary, they would be a huge help in solving some of the challenges. Are they still officially supported?
I have #define functions at the first line of my script, but the following code still fails with a syntax error:
#define functions
float line_length(int x1, int y1, int x2, int y2)
{
int delta_x = abs(x1 - x2);
int delta_y = abs(y1 - y2);
return sqrt((delta_x * delta_x) + (delta_y * delta_y));
}
int main()
{
line_length(3, 4, 7, 9);
return 1;
}
I was just looking, it seems
I was just looking, it seems that functions don't work with challenges... only actual program scripts... I see why you'd want them to work for challenges, so I'll look into that for you.