int main(int argc, string argv)
./caesar = argv;
With argv, I intend to make sure that this performs ./caesar command when entered through command line interface.
Kindly guide how to correct as the above code showing error while compiling.
You don’t need to make sure that your program starts with “./caesar” … if the user starts the program with something else, then your program simply will not start 🙂
But comparing two strings can be done with strcmp(), check how to use in the manual pages: https://manual.cs50.io/. You cannot compare two strings with ‘==’, you will learn later why not.
Also, a string needs to be enclosed in ” …”
Okay, understood that not to include ./caesar = argv for argv.
But not clear what then I should include for argv.
You don’t include anything for argv. It will always be the name of the program. It will be ./caesar (or the absolute path to it) unless the user renames the executable and there’s no reason to prevent them from doing that.
Okay, then no need to include argv as part of the main body.