#include <iostream>
using namespace std;
// int x[2] = {1, 2};
// int y[2] = {1, 2};
struct Player
{
int x;
int y;
};
Player players[2] = {
{ 1, 1 },
{ 2, 2 }
};
int main()
{
Player player_1 = players[0];
cout << "player_1" << endl;
cout << "x: " << player_1.x << endl;
cout << "y: " << player_1.y << endl;
cout << endl;
// ===== ===== ===== ===== =====
Player player_2 = players[1];
cout << "player_2" << endl;
cout << "x: " << player_2.x << endl;
cout << "y: " << player_2.y << endl;
cout << endl;
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: