Say for example i want to open a file in Program Files then I've tried this much...
system("start C:\\Program Files");
The part that goes wrong is that it searches for 'C:\Program' but doesn't include the 'Files'. Is there a special thing to type for spaces using the '\' or something?
Your problem is that the start command is interpreting c:\Program Files as two parameters and only considering the first one, c:\Program. In order to get it to recognize the entire string, c:\Program Files, as the first parameter, put quotes around it, like so:
system("start \"C:\\Program Files\"");
Also strcmp compares two strings and is case sensitive. What did you use to compare them without being case sensitive again?
A common solution to case-insensitive comparison is to convert both string to either all upper or all lower case. The following code writes to the console that "Test" and "tEsT" are equal strings (compiled with Visual C++ .net 2003)
using namespace std;
char string1 = "Test";
char string2 = "tEsT";
if(strcmp(string1, string2) == 0)
cout << "The strings are equal in a case-insensitive comparison." << endl;
cout << "The strings are not equal in a case-insensitive comparison." << endl;
Thirdly, is there a way to bundle media files with your program that way they cant be seperated?
You can add any information you want to an exe or dll file by adding resources. If you are using Visual C++, you add a new file to your solution and select resource as the type. Then in the resource editor you add a custom type. Give it a name and up comes a binary editor. All you have to do now is get the binary data from the media file into the editor, and read it at the appropriate time during program execution. I've not ever done anything like that, so maybe someone else that is more familiar could offer some direction.