#include <chemfiles.h>
#include <stdlib.h>

int main() {
    // [example]
    CHFL_RESIDUE* residue = chfl_residue("water", 3);
    CHFL_RESIDUE* copy = chfl_residue_copy(residue);

    if (copy == NULL) {
        /* handle error */
    }

    chfl_residue_free(copy);
    chfl_residue_free(residue);
    // [example]
    return 0;
}
