C2601: local function definitions are illegal

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mumya0236
    New Member
    • Oct 2015
    • 5

    C2601: local function definitions are illegal

    Hi Guys I have some problem with C++ its give me error C2601

    C2601:Compare: local function definitions are illegal
    C2601:FindPatte rn: local function definitions are illegal


    Code:
    	bool Compare(const BYTE* pData, const BYTE* bMask, const char* szMask)
    	{
    		for (; *szMask; ++szMask, ++pData, ++bMask)
    		if (*szMask == 'x' && *pData != *bMask)
    			return false;
    		return (*szMask) == NULL;
    	}
    
    
    	DWORD FindPattern(DWORD Address, DWORD offset, BYTE* bMask, char* szMask)
    	{
    		for (DWORD i = 0; i < offset; i++)
    		if (Compare((BYTE*)(Address + i), bMask, szMask)) return (DWORD)(Address + i);
    		return 0;
    	}

    Thanks
  • mumya0236
    New Member
    • Oct 2015
    • 5

    #2
    Solved. I did put all codes in another class.

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      I have no idea what you solved but your reported error is not in the code you posted.

      What class are you talking about? All the code looks like C and there are no classes in C.

      Comment

      Working...