First: I'm trying to use SHGetFolderPath (I know, it says not to use it on msdn, but I was also told to use it anyways because the program is intended for a computer using windows XP) with CSIDL_PROGRAM_FILES to get the path to the program files folder.
Second: I was trying to use StringCchCat to concatenate a string containing the name of a directory to the path returned by SHGetFolderPath.
Third: I was trying to use MoveFile to move the directory to the path returned by StringCchCat.
When I tried to use std::string, it gives this error:
error: cannot convert 'std::string' to 'CHAR*' for argument '5' to 'HRESULT SHGetFolderPathA(HWND__*, int, void*, DWORD, CHAR*)'
With regard to the strsafe.h - it comes with the Windows SDK and is really a Microsoft Visual Studio thing.
If you are using something like CodeBlocks with MinGW G++ compiler, then you probably won't have the windows SDK anyway.
The strsafe.h header file is self contained - the functions are inline functions.
But this header file contains a load of MS Compiler related macros and pragmas which would choke the G++ compiler (the pragmas will be unknown and be skipped by the G++ compiler).
So are you using visual studio?? if so then download the windows SDK.
if you are using MinGW/GCC you could well be stuffed and have to use the standard strcat function.