This may be an obvious answer but I have little experience with C++. I am trying to pass a location of a files to system so that It will run it.
The code Im using:
char test[20] = "C:\\";
system("PAUSE & cd "+test[]+" & ping.text & PAUSE");
Which is not working. This is how I would do things in java really. How would I go about getting the character array test into that system string ? Any help or even a link to a possible solution would be a great help.
I have managed to solve this problem using the following code:
As I am relatively inexperienced with C++, I am unsure if this is the ‘best’ way to go about things but It got my code working correctly without issues. If anyone has any information to add to this solution I will update this answer.