Link to home
Start Free TrialLog in
Avatar of sumitk
sumitk

asked on

ShellExecute

Hi,

Can any one guide me what could be problem with this ShellExecute statement.

ShellExecute(NULL,_T("open"),temp,0,0, SW_SHOWNORMAL);

I am getting an error ::" cannot convert parameter 3 from 'char *' to 'con"

temp is a char* variable which store Filename along with path.

It's urgent

Regards
Sumit
Avatar of sumitk
sumitk

ASKER

I am using temp variable like this
char* temp = "d:\\\\temp\\\\xyz.txt";
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry.I pasted what  U have written char* temp = "d:\\\\temp\\\\xyz.txt";

but it should be
char* temp = "d:\\temp\\xyz.txt"; yes it should be like this.

//JKR
But still  i feel he must have written it by mistake.The way compiler is giving the error.
 cannot convert parameter 3 from 'char *' to 'con".Normally for the above it  will still a compiles &&links without giving any error.


Most importantly Even  char* temp = "d:\\\\temp\\\\xyz.txt"; will work .
Split?