none
error C2059: syntax error : 'constant'

    Question

  • When I compile the below function, the error comes. [error C2059: syntax error : 'constant']

     

    typedef enum
    {
     MMVE_INTERNAL_MEMORY  = 0x0,
     MMVE_SD_MEMORY   = 0x1,
     MMVE_NO_SPACE   = 0x2,
     MMVE_MAX_STORAGE_TYPE = 0x7fffffff
    }MMVE_E_STORAGE_TYPE;

     

    static unsigned int GetFreeSpace(int eStorageType)
    {
     unsigned int unFreeSpace = 0;
     switch(eStorageType)
     {
      case MMVE_INTERNAL_MEMORY:
       unFreeSpace = FileSys_GetFreeSpace(L"/LGAPP");
       break;
      case MMVE_SD_MEMORY:
       unFreeSpace = FileSys_GetFreeSpace(L"/mmc1");
       break;
      default:
       break;
     }
     return unFreeSpace;
    }

     

    How can I fix the error ?

    Monday, December 31, 2007 5:49 AM

Answers

  •  

    Hi~

    Your problem is really simple.

    GetFreeSpace function already defined somewhere.

    So, change function name of GetFreeSpace.

     

    Happy new year~

    Monday, December 31, 2007 10:09 AM

All replies

  •  

    Hi~

    Your problem is really simple.

    GetFreeSpace function already defined somewhere.

    So, change function name of GetFreeSpace.

     

    Happy new year~

    Monday, December 31, 2007 10:09 AM
  • If i am not wrong GetFreeSpace() is a Window API. So instead of this use some other function name.

    Thanx
    Monday, December 31, 2007 4:54 PM