In a previous discussion I was informed about the execl() function that can be used in place of system(). So what are the differences between the following:
andCode:#include <unistd.h> int main(){ execl("C:\\WINDOWS\\NOTEPAD.EXE", 0); return 0; }
What are the advantages of using execl() if any? Is it any safer to use than the dreaded system() call function?Code:#include <iostream> int main(){ system("C:\\WINDOWS\\NOTEPAD.EXE"); return 0; }
Thoughts?