I have a code that is written in C++17 takes values x and y as inputs and give some value as output. I want to change it to take as many inputs ( x and y values) and give outputs. What changes needed to be done in the code
what is happening in the code is : with some x and y coordinates it finds the coordinate number.
int main(void) {
const std::vector<Tile> tiles{ Tile(0),Tile(1),Tile(2),Tile(3) };
// Test values
const double x{ 3700 }; // want to add multiple entries here
const double y{ 11261 }; // want to add multiple entries here
// Check cell number
for (const Tile& tile : tiles) {
if (const auto [isInTile, cellNumber] = tile.getCellNumber(x, y); isInTile) {
std::cout << "\nCellnumber: " << cellNumber << "\n:)\n\n\n\n\n\n";
}
}
return 0;
}
I have tried many changes but always end in some error also I am new to c++ my primary language is python.