- Moderatör
- #1
aka panic.rs
Kurucu
Kod:
#define SIZEARRAY(target,type) sizeof(##target) / sizeof(##type)
Kod:
typedef struct {
int wepid;
char* name;
} tWeapons;
const tWeapons wPFunc[] = {
{ 103, "0 Silah" },
{ 223, "1 Silah" },
{ 444, "2 Silah" },
{ 999, "3 Silah" },
{ 888, "4 Silah" },
{ 666, "5 Silah" },
{ 444, "6 Silah" },
{ 116, "7 Silah" },
{ 568, "8 Silah" },
{ 123, "9 Silah" },
{ 3169, "10 Silah" },
};
Kod:
for (size_t i = 0; i < SIZEARRAY(wPFunc,tWeapons); i++)
{
std::cout << "id : " << wPFunc[i].wepid << " name : " << wPFunc[i].name << std::endl;
}