Hello All,
To start with i think tell you that i started learning c++ about 2 years ago and abanded it but i found that it is the only true programing language that is really any good, so basically i'm back to being a complete beginner.
my problem is with a program which I'm creating I'm trying to make sort of virtual command line for the program here is the code:
Code:
int main()
{
char command[256];
int cmdloop;
EchoProjectInfoIntoConsole();
cmdloop = 0;
while (cmdloop == 0) {
cout<< "#";
cin>> command;
if (strncmp(command,"help",4)){
}else{
cout<< "@ Invaild Command\n";
}
}
return 0;
}
as i'm sure you can see i'm trying to compare the char's being using the srtncmp function when i run the program and type the ommand nothing happens sept it says that the command is invaild.
can anyone help me please?