I'm working on a small little project to simulate the linux OS for complete newbies and I was wondering, I kept trying to find a way to use ifs and else statements for them to analyze the char variable and do something. But I can never get it to read the char variables in any of the if's statements. I've researched the net a bit, and have not been successfull. A snippet of the code is:
printf("\n > ");
gets(temp);
if (temp=='ls')
{
printf("testing");
}
else { printf("Something went wrong....beta code"); }
btw, yes i declared all vars, and i did everything needed, i'm not THAT stupid ;P. So if someone could please hook me up, i'd be very thankful. :)
p.s. if your a C string god, is there anyway to add an effect to the printed characters to make then like seem to type by themselves on letter at a time? If not, thanx anway. =)