From: Thomas J. Hruska [mailto:[EMAIL PROTECTED]

>At 04:08 PM 10/24/2004 -0700, Kinga Kulesza writeth:
>>
>>Hopefully the moderator want scald me for persistent asking newbee
>>questions :-) but..... I want to come
>
>I try to not bite :)  And this group is designed to welcome
>newbies to C/C++.  You'll probably get told to search Google
>often for answers by others - others will give solutions, and
>everyone tries to solve other people's problems in the midst
>of pedantic discussion over the finer points of C/C++.

Someone mention pedantry? ;)

>>#include<stdio.h>
>
>#include <stdio.h>
>
>(Missing the whitespace between #include and <stdio.h>).
>
>>main()

int main(void) /* :) */

>>{
>>
>>char choice[1];
>
>char choice;
>
>>do
>>{
>>      printf("This is a simple test. Do you want to repeat me?\n");
>>      printf("continue y/n");
>>      printf("\n");
>>      scanf("%c",choice);
>
>If you have to use scanf:
>
>scanf("%c", &choice);
>
>Something less portable would be getch() under Borland or the
>ncurses library under Linux, but pretty much anything is
>technically better than
>scanf() (I personally prefer fgets(), but single character
>entries usually warrants a different solution).  It looks like
>you are using gcc and/or cc, so I'll assume Linux and
>recommend looking into using ncurses.
>
>>}
>>while(choice=='y' || choice=='Y');
>>
>>printf("GOODBYE\n");

return 0;

>>}
>

</pedant>

--
PJH

"Consistently separating words by spaces became a general custom about
the tenth century A.D., and lasted until about 1957, when FORTRAN
abandoned the practice." -- Sun FORTRAN Reference Manual



Alderley plc, Arnolds Field Estate, The Downs, Wickwar, Gloucestershire, GL12 8JD, UK
Tel: +44(0)1454 294556 Fax: +44 (0)1454 299272

Website : www.alderley.com  Sales : [EMAIL PROTECTED] Service : [EMAIL PROTECTED]

This email and its contents are confidential and are solely for the use of the intended recipient. If you are not the original recipient you have received it in error and any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. Should you receive this email in error please immediately notify [EMAIL PROTECTED]

This email has been scanned for viruses, however you should always scan emails with your own systems prior to opening.






To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=294855.5468653.6549235.3001176/D=groups/S=:HM/A=2376776/rand=596709711


Yahoo! Groups Links

Reply via email to