[Dev-C++] PWD.H exist in the HELP but doesen't exist in DEV-C++ ...where get ??
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Wendel <we...@ha...> - 2001-04-12 19:32:52
|
Hi Programmers, I'm begginer in programming and in C/C++ ... :-) I was looking for my help (GNU) in DEV-C++ and i want use a function that need pwd.h ... i put it #include <pwd.h> ...but the compiler spoke me that it doesen't exist...i i was found and realment doesen't exist in my HardDisk ... :-/ Do you know where i can get ?? O better where i can get "several LIBS utils" ?? Until GNU libs ... for C/C++ ... :-) Example ... exist "netdb.h" or other libs used in C for linux, exist this libs to win ?? Where i can get it thinks ?? :-)) I was looking for help and ...is of this kind: The help is: You can search the system user database for information about a specific user using getpwuid or getpwnam. These functions are declared in pwd.h. Function: struct passwd * getpwuid (uid_t uid) This function returns a pointer to a statically-allocated structure containing information about the user whose user ID is uid. This structure may be overwritten on subsequent calls to getpwuid. A null pointer value indicates there is no user in the data base with user ID uid. Function: int getpwuid_r (uid_t uid, struct passwd *result_buf, char * buffer, size_t buflen, struct passwd **result) This function is similar to getpwuid in that is returns information about the user whose user ID is uid. But the result is not placed in a static buffer. Instead the user supplied structure pointed to by result_buf is filled with the information. The first buflen bytes of the additional buffer pointed to by buffer are used to contain additional information, normally strings which are pointed to by the elements of the result structure. In pwd.h help: Data Type: struct passwd The passwd data structure is used to hold information about entries in the system user data base. It has at least the following members: char *pw_name The user's login name. uid_t pw_uid The user ID number. Based in it, How to need i do to get a ID of user ?? Please give me a real example...kind ... how to get the ID of user and print on the screen with printf ?? Thkz for all Best Regards [ ]'s |