C/C++ Arena

Step 1 of 6

Define a struct

A struct bundles several variables into one new type:

struct Player {
    char name[16];
    int kills;
    int deaths;
};

struct Player p = {"flusha", 21, 14};
printf("%s %d\n", p.name, p.kills);   // . accesses a member

Your turn: complete the struct and print the weapon's name and damage.

Next: Structs in functions