C++ syntax error : missing ';' before '*'
-
Hi
I have this code@#ifndef SHELLUTILS_H
#define SHELLUTILS_H#ifdef SHELLUTILS_EXPORTS
#define SHELLUTILS_API __declspec(dllexport) __stdcall
#else
#define SHELLUTILS_API __declspec(dllimport) __stdcall
#endifextern "C"
{typedef wchar_t* (__stdcall *SelectedFilesFunc)();
typedef void (__stdcall FreeSelectedFilesFunc)(wchar_t buff);
/*typedef HRESULT (__stdcall CreateShortCutFunc)(LPCSTR pszTargetfile, LPCSTR pszTargetargs,
LPCSTR pszLinkfile, LPCSTR pszDescription,
int iShowmode, LPCSTR pszCurdir,
LPCSTR pszIconfile, int iIconindex);/SHELLUTILS_API wchar_t* SelectedFiles();
SHELLUTILS_API void FreeSelectedFiles(wchar_t* buff);
/SHELLUTILS_API HRESULT __stdcall CreateShortCut(LPCSTR pszTargetfile, LPCSTR pszTargetargs,
LPCSTR pszLinkfile, LPCSTR pszDescription,
int iShowmode, LPCSTR pszCurdir,
LPCSTR pszIconfile, int iIconindex);/}
#endif //SHELLUTILS_H@@@
When I compile this code in VS 2010 I get the following error
Error 8 error C2143: syntax error : missing ';' before '*' C:\Users\Administrator\Desktop\PC simple share\shellutils\shellutils.h 20 1 simpleshare
Error 10 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\Administrator\Desktop\PC simple share\shellutils\shellutils.h 20 1 simpleshare
Error 11 error C2377: 'wchar_t' : redefinition; typedef cannot be overloaded with any other symbol C:\Users\Administrator\Desktop\PC simple share\shellutils\shellutils.h 20 1 simpleshare
Error 12 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C:\Users\Administrator\Desktop\PC simple share\shellutils\shellutils.h 20 1 simpleshare
Error 13 error C2062: type 'void' unexpected C:\Users\Administrator\Desktop\PC simple share\shellutils\shellutils.h 21 1 simpleshare -
Hi,
This is rather a Visual Studio question. You should ask this question on the Microsoft Developer Network forums