thx guys. Now i just made a .bat file in each dir and run the bat file
batfile:
cd c:\games\tibia
tibia.exe
thx again
great board
thx guys. Now i just made a .bat file in each dir and run the bat file
batfile:
cd c:\games\tibia
tibia.exe
thx again
great board
I havn't got this to work, pls help somebody.
cin>>oppnaFil;
if((strcmp("1",oppnaFil)==0))
val2();
else
ShellExecute(NULL, "open", oppnaFil, NULL, NULL, SW_SHOWNORMAL);
Nevermind the variabels, they're in Swedish . What I wanna do is to be able to lauch a file (oppnaFil), that's in a dir with spaces, how do I do that? If I input: \"c:\\spel\\half life\\hl.exe\"
for example, it doesn't work.
cin>>oppnaFil;
Try
cin.getline(oppnaFil);
almost right...
try creating a buffer ( char array)
char buffer[255];
then get a line into it like this...
cin.getline(buffer, sizeof(buffer));
That will read a string completely up to the 254th char inserting a null byte after the last char read.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi