I am working on a console project and I just can't get this part to work.
void execute(char* argv[]) {
char* printex = "print";
if (argv[1] == printex) {
print(argv);
}
else {
cout << "Unknown function." << endl;
}
}
Every time I type in "print" for argv[1]
, it thinks I have typed in something else. I tried putting in
cout << argv[1];
and the output was print. Why is it not working then?