What do I do wrong?

Mark Tapper markt at polari.UUCP
Mon Dec 17 15:19:21 AEST 1990


In article <1990Dec13.023035.19793 at IRO.UMontreal.CA> quennevi at IRO.UMontreal.CA (Charles Quenneville) writes:
>Hello!
>
>Could you tell me what is wrong with this program? All I'm trying to do
>is simply to print the username. 
>
Deleted most of small program to read names from the passwd file.
>    printf("\n", pwd->pw_name);

Here is your problem,  you forgot to put a %s in the printf. it should look
like this.
    printf("%s\n", pwd->pw_name);

>--
>    Charles Quenneville
>    quennevi at kovic.iro.umontreal.ca
>
>"Ventrebleu, de par ma chandelle verte, j'aime mieux etre gueux



More information about the Comp.unix.wizards mailing list