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++.


>#include<stdio.h>

#include <stdio.h>

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

>main()
>{
>
>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");
>}


Thomas J. Hruska
[EMAIL PROTECTED]

Shining Light Productions
Home of the Nuclear Vision scripting language and ProtoNova web server.
http://www.slproweb.com/





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=295196.4901138.6071305.3001176/D=groups/S=:HM/A=2128215/rand=962669903


Yahoo! Groups Links

Reply via email to