hi ,
for starters i hope this question wasn't posted yet.
i want to write a small program that askes the user what he wants to do , and then executes the comand in system . But for some reason it doesn't quit on the key word
this is the code:
Code:
#include <stdio.h>
/*a simple interaction programme that schow the system options*/
#define systemt "\x1b[32m" /*changes the color to green for system output*/
#define user "\x1b[0m" /*changes the color to white for user input*/
int main()
{
char name[20],choise[20];
printf(systemt "hello user what's you name? \n");
printf(user);
gets(name);
do{
printf(systemt"hi %s, how can I help you ? \n",name);
printf(user);
gets (choise);
system(choise);}
while(choise !="bye");/*does not quit loop when i type bye*/
return(0);
}
/*void help()
{
}*/
Is there something wrong white the code or does the system bock me from reusing the choise string.
thx for all reply's
ps i'll inculde the original c file as well