I'd like to write a C++ program that will randomly select a background image from a desired directory. I'd like the directory to be a command-line argument. Reading a post from earlier today, I saw some info about the function .c_str() which can be used to convert c-style strings to c++ strings. I have a few questions:
1. Is .c_str() the way to go when I need to convert strings to put in the system() calls?
2. Which headers will I need? <string>? <cstring>? both?
3. Any general advice how to go about this, what to beware of, etc.?
Your help is truly appreciated.