Mimicking classes with structs in C I'm trying to mimic classes. Is there anything with this code that I should not do with C or any ways that I can improve it at all, such as best practices or anything?

structs.h

#ifndef PLAYER_H
#define PLAYER_H

typedef struct  {
    char name[30];
    int damage;
    int durability;
} weapon;

typedef struct {
    int health;
    int armor_level;
    int currency;
    weapon player_weap;
} player;

#endif


main.c

#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
#include "structs.h"

player new_player();
void print_player(player user);

int main(void) {

    player user = new_player();
    print_player(user);

    return 0;
}

player new_player() {

    player new_player;
    new_player.health = 100;
    new_player.armor_level = 0;
    new_player.currency = 0;
    strcpy(new_player.player_weap.name, "Starter Sword");
    new_player.player_weap.damage = 1;
    new_player.player_weap.durability = 100;

    return new_player;

}

void print_player(player user) {
    printf("The players health is %d.\n", user.health);
    printf("The players armor is %d.\n", user.armor_level);
    printf("The players currency is %d.\n", user.currency);
    printf("The players weapon is the %s.\n", user.player_weap.name);
    printf("The players weapon does %d damage and has %d durability.\n", user.player_weap.damage, user.player_weap.durability);
}
It's pretty simple and readable as far as it goes, which is good. It doesn't do a whole lot but I have some comments that you might consider.

methods?

It's curious that you mention mimicking classes but there are no function pointers in the structs. In C it's more difficult to get the constructor in there, but print could be a function pointer.

typedef struct {
    //...
    void (*print)(struct player);
    //...
} player;

player new_player() {
    //...
    new_player.print = print_player;
    //...
}

int main(){
    //...
    user.print(user);
    //...
}


Initializers

C does have a nice initializer syntax, esp. with C99's designators. Your 
constructor function could be somewhat nicer by using the initializer.

player new_player() {

    player new_player = {
    .health = 100,
    .armor_level = 0,
    .currency = 0,
    .player_weap = {
        .name = "Starter Sword",
        .damage = 1,
        .durability = 100
        }
    };

    return new_player;
}


Or even simpler with a compound literal.

player new_player() {
    return (player) {
    .health = 100,
    .armor_level = 0,
    .currency = 0,
    .player_weap = {
        .name = "Starter Sword",
        .damage = 1,
        .durability = 100
        }
    };
}