nazerke
11/27/2019 - 4:13 AM

struct data type

#include <cstdio>
using namespace std;

struct Employee {
    int id;
    const char * name;
    const char * role;
};

int main() {
    Employee joe = { 42, "Joe", "Boss" };
    
    printf("%s is the %s and has id %d\n",
           joe.name, joe.role, joe.id);
    
    return 0;
}