visual c++ - obtaining Current directory in VC++ forms -


i working on vc++ forms code. need current directory open form of project. while tried code find on internet same problem. posting 1 of code below. output of code true or false not returning string current directory value.

tchar pwd[max_path]; getcurrentdirectory(max_path, pwd); messagebox::show(convert::tostring(&pwd), "my application", messageboxbuttons::okcancel, messageboxicon::asterisk);

please me out how know current directory in vc++ forms

you passing address of pointer convert::tostring(). pwd array , using variable name without array subscript automatically decays pointer. want use either

convert::tostring(pwd) 

or

convert::tostring(&pwd[0]) 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -