I am trying to say if I is 203 and plane is the same as another plane, say plane182 in my plane array, do whatever. Problem is that code can not be compiled do to the error
I don't know what I is though. I am saying at a random point In the array is I and if plane[I] == any other plane[whatever] do code. No specific examples please.
Yes but how can I do that while saying if plane[I] == plane[203] and I is 203 how can I stop the program from running error code easily? I could just use a bunch of ors in a if statement if it wasn't for that issue.
z = 0;
while (z <= 499) {
if (plane[I] == plane[z]) {
if (I == z) {
z++ ;
//how do I get it skip the first if statement in this case?
}
cout << "Plane already logged.";
}
\\continue code
z = 0;
while (z <= 499)
{
if (I == z) // <- comparing I to z
{
// <- code in here will only run when I is equal to z
z++; // <- only increment z if I is equal to z
if (plane[I] == plane[z]) // <- only compare planes if I is equal to z
{
}
cout << "Plane already logged.";
}