Unknown cause for error

I do not know what is causing these errors:
1
2
3
4
error: expected primary-expression before '(' token
error: expected primary-expression before '(' token
error: expected primary-expression before '(' token
error: expected primary-expression before ')' token


The code that causes the errors is as follows
1
2
3
4
Matrix4x4<T> r(Vector4<T>((2/(right - left)), 0, 0, -((right + left)/(right - left))), 
               Vector4<T>(0, 2/(top-bottom), 0, -((top + bottom)/(top - bottom))), 
               Vector4<T>(0, 0, (-2)/(far - near), (far + near)/(far - near)), 
               Vector4<T>(0, 0, 0, 1));


What makes it even stranger is that this code compiles:
1
2
3
4
Matrix4x4<T> r(Vector4<T>(1, 1, 1, 1), 
               Vector4<T>(1, 1, 1, 1),
               Vector4<T>(1, 1, 1, 1), 
               Vector4<T>(1, 1, 1, 1));


Any help would be greatly appreciated.
That is strange. It compiles for me.
Can you point at exactly which parenteses error messages are pointing?
Maybe you're reusing your variable names for something else like a #define Macro? Check your global space, or better yet use ctrl+f to search the code for instances of these variable names.
Are you dividing by 0 somewhere?
Dividing by zero does not produce compile-time errors.
@Computergeek01 I think you are correct, I changed the variable names and the code compiled! I cannot however find any place where I have created a #define for those variables. I will keep searching.
Topic archived. No new replies allowed.