changing directory and running linux commands in c++ code

Hi,
I want to run linux commands from my c++ code. and before running these commands i need to change the directory as well.
any suggestions how can i do it.
Look at chdir(2)
Topic archived. No new replies allowed.