I'm using VC++ .net to write a program for searching through files in a directory and then opening them. The only problem I have run into is opening the file. I tried using streamreader but this does not work for opening pdf files. Currently I'm using system ("start //location and name of file");
ex:
system("start c:\\Users\\Member\\Desktop\\filename.pdf");
Now this works great except for the fact that I need for filename to be changed while in my program. I tried passing a string that was gathered earlier in the program into it and I get an error saying that cannot convert parameter 1 from System:: String ^ to const char *
code error:
system("start c:\\Users\\Member\\Desktop\\"+filename+".pdf");
Any and all help will be appreciated. ps: I have trolled the interwebz looking for an answer and can't find anything helpful.