1

Try to execute command line codes from c++ linux

view story
linux-howto

http://stackoverflow.com – I tried the following code, to communicate with the command line from c++ code. #include<iostream> #include<cv.h> int main() { system("gnome-terminal"); system("cd"); } The gnome-terminal command is executing fine. After I close the terminal, when am expecting the cd to execute, however, is not happening. Could you please help me and point out the reason? Thanks. I was expecting the function to make the cmd go down to the home directory , but it did not. am working in linux I tried it even by removing gnome. simple cd is not working (HowTos)