Overloading [] operator to take two arguments

Hello everybody,
I'm new in c++ and im trying to overload the [] operator for a two dimension array.
I found out that I cant overload straight for the 2-D array because the first [] must return an pointer type and the second one an integer type.
I can overload the () operator and use a syntax like follow:
1
2
3
4
5
6
7
8
class patoma{
   int **pinakas;
public:
   int &operator()(int x, int y);
};
int &patoma::operator()(int x, int y){
   return pinakas[x][y];
}


But I was wondering why is the same thing impossible with the []?
And what i mean is to use [x, y].

Isn't it the same thing?
Is there any way to make the [] operator to take two arguments?

Thank you in advanced

-Dimitris-
There isn't. operator[] must take exactly one argument because that is how the C++ grammar defines the usage of [].
Thank you jsmith.
You might want to read this for more information
http://www.parashift.com/c++-faq-lite/operator-overloading.html#faq-13.11
Topic archived. No new replies allowed.