Array of structures vs Structure of arrays
Какиe будут ваши за и против?
struct User
{
int id;
int money;
int something;
char something_else;
bool active;
...
...
float more_data;
}
std::vector<User*> users;
или
struct UserManager
{
size_t amount;
int * ids;
int * money;
int * something;
char * something_else;
bool * active;
...
...
float * more_data;
void setUserMoney(int uid, int money);
//etc...
}