I'm stuck on a recursive function in the C code (I did not write the C code). Here is the snippet I'm converting:
int makeroad(float x1, float y1, float x2, float y2, float var, float X[], float Y[], float prec)
{
//stuff
k+=makeroad(x,y,x2,y2,var,X+k,Y+k,prec);
}
I'm not entirely sure what this is doing. This is the only function in the C code with that name, so it's not an overloading issue. When it recursively calls itself, it is adding k to the X and Y arrays. Putting it in C# looks like this:
int makeroad (float x1, float y1, float x2, float y2, float var, float[] X, float[] Y, float prec)
{
//stuff
k += makeroad(x, y, x2, y2, var, X + k, Y + k, prec);
}
And Visual Studio is telling me that the X + k and Y + k are invalid. The original C code compiles and works fine in Visual C++ Express 2010. I don't think there was confusion between the upper and lower case x and y variables respectively. If there was, the code is working by sheer luck.
Any ideas?