[packagekit] C dude needed
Matthias Clasen
matthias.clasen at gmail.com
Wed Feb 20 15:46:52 PST 2008
On Wed, Feb 20, 2008 at 5:51 PM, Richard Hughes <hughsient at gmail.com> wrote:
> On Wed, 2008-02-20 at 23:37 +0100, Adrien BUSTANY wrote:
> > Well, some bare code could be like :
> > #include <stdio.h>
> >
> > int main(int argc, char **argv) {
> > char answer;
> > printf("Would you like to plop ? [N/y] ");
> > scanf("%c", &answer);
> >
> > switch (answer) {
> > case 'y':
> > printf("Cool, let's go plopping\n");
> > break;
> > default:
> > printf("Too bad, maybe another time\n");
> > }
> > return 0;
> > }
> >
> > of course this could be wrapped into a neat function
>
> That'll do nicely, thanks.
>
No need to go all the way to fscanf
More information about the PackageKit
mailing list