double vertex[0,1,2];

Is this legal ?
1
2
3
4
double vertex[3];
 if (vertex[0,1,2]<90) //Is this legal ?
  cout<<"Obtuse";

My compiler doesn't give me an error, but I am not sure if this is a legal notation. I am trying to compare each of the three values in the array to 90. I was trying to shorten my code so I tried this, and it worked. However I'm wondering if its legal and if I might run into trouble using this syntax.
Topic archived. No new replies allowed.