#include <iostream>
struct Brinquedo {
int Objetos;
int Bola;
int Carrinho;
int Caixa;
int Dinamite;
void func(int st_Bola, int st_Carrinho, int st_Caixa, int st_Dinamite) {
Bola = st_Bola;
Carrinho = st_Carrinho;
Caixa = st_Caixa;
Dinamite = st_Dinamite;
}
};
int main() {
Brinquedo brinquedo;
//não fazia sentido ter as duas variáveis aqui, cada uma fazendo algo totalmente diferente
brinquedo.func(10,9,15,25);
std::cout << brinquedo.Bola << brinquedo.Carrinho << brinquedo.Caixa << brinquedo.Dinamite;
}
//https://pt.stackoverflow.com/q/225091/101
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IEJyaW5xdWVkbyB7CiAgICBpbnQgT2JqZXRvczsKICAgIGludCBCb2xhOwogICAgaW50IENhcnJpbmhvOwogICAgaW50IENhaXhhOwogICAgaW50IERpbmFtaXRlOwogICAgdm9pZCBmdW5jKGludCBzdF9Cb2xhLCBpbnQgc3RfQ2FycmluaG8sIGludCBzdF9DYWl4YSwgaW50IHN0X0RpbmFtaXRlKSB7CiAgICAgICAgQm9sYSA9IHN0X0JvbGE7CiAgICAgICAgQ2FycmluaG8gPSBzdF9DYXJyaW5obzsKICAgICAgICBDYWl4YSA9IHN0X0NhaXhhOwogICAgICAgIERpbmFtaXRlID0gc3RfRGluYW1pdGU7CiAgICB9Cn07CgppbnQgbWFpbigpIHsKICAgIEJyaW5xdWVkbyBicmlucXVlZG87CiAgICAvL27Do28gZmF6aWEgc2VudGlkbyB0ZXIgYXMgZHVhcyB2YXJpw6F2ZWlzIGFxdWksIGNhZGEgdW1hIGZhemVuZG8gYWxnbyB0b3RhbG1lbnRlIGRpZmVyZW50ZQogICAgYnJpbnF1ZWRvLmZ1bmMoMTAsOSwxNSwyNSk7CiAgICBzdGQ6OmNvdXQgPDwgYnJpbnF1ZWRvLkJvbGEgPDwgYnJpbnF1ZWRvLkNhcnJpbmhvIDw8IGJyaW5xdWVkby5DYWl4YSA8PCBicmlucXVlZG8uRGluYW1pdGU7Cn0KCi8vaHR0cHM6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzIyNTA5MS8xMDE=