I've got a VS 2010 project that makes some pretty standard typedefs like:
Expand|Select|Wrap|Line Numbers
- typedef int mlInt;
Expand|Select|Wrap|Line Numbers
- void mlVecMult(int length, int* vec1, int* vec2, int* vecOut);
Expand|Select|Wrap|Line Numbers
- void mlVecMult(mlInt length, mlInt* vec1, mlInt* vec2, mlInt* vecOut)
- {
- for(mlInt i=0; i < length; i++)
- {
- vecOut[i] = vec1[i] * vec2[i];
- }
- }
ml_vector.c(5): error C2143: syntax error : missing ';' before 'type'
.. so it doesn't find the type properly. BUT if I change the extension of the file vector.c to .cpp, it works fine.
Is this some C syntax thing I'm forgetting? Thanks for any help.