error: 'struct passwd' has no member named 'pw_comment'

http://www.sics.se/man2html/getpwent.3v.html

 

getpwent(), getpwuid() and getpwnam() each return a pointer to an object with the following structure containing the fields of a line in the password file. Each line in the file contains a passwdstructure, declared in the <pwd.h> header file:

    struct  passwd {
            char    *pw_name;
            char    *pw_passwd;
            uid_t   pw_uid;
            gid_t   pw_gid;
            int     pw_quota;
            char    *pw_comment;
            char    *pw_gecos;
            char    *pw_dir;
            char    *pw_shell;
    };
    struct
    passwd *getpwent(), *getpwuid(), *getpwnam();

 

你可能感兴趣的:(shell,struct,object,File,each,structure)