Error de gets

PHOTO EMBED

Sun Aug 15 2021 20:38:50 GMT+0000 (Coordinated Universal Time)

Saved by @luisjdominguezp #c

#include <stdio.h>
int main () {
    char username[8];
    int allow = 0;
    printf external link("Enter your username, please: ");
    gets(username);
    if (grantAccess(username)) {
        allow = 1;
    }
    if (allow != 0) {
        privilegedAction();
    }
    return 0;
}
content_copyCOPY

Nowadays, this code requires special flags to compile, also, it may need special environment, but it's an example of what happened before, and an illustration about how things can go wrong by generalising.