Compiler alert to test[ x,y] arrays in c++

Started by
0 comments, last by Kylotan 18 years, 11 months ago
Is there anyway to have the compiler alert when it sees arrays being referenced as... test[x,y] I am coming from c#, and I keep referencing my arrays like this which is causing me serious grief. Why does c++ even have this format anyways, if it doesn't support it? BTW, I am using VS2003 .NET. Thanks
Advertisement
The problem is that "x,y" is a valid expression, and the array index can be any expression of the correct type. I believe gcc is able to emit a warning in this case but I don't believe Microsoft C++ will do so unless you make the mistake inside an if statement.

This topic is closed to new replies.

Advertisement