Zła metoda

0

Witam. Mógłby mi ktoś powiedzieć co jest nie tak?

Kopiuj
unsigned long *Function(Inter Create, char *Name);

unsigned long Class::*Function(Inter Create, char *Name)
{
	unsigned long *temporary = NULL;
	while ( temporary == NULL)
	{
		temporary = reinterpret_cast<unsigned long*>(Inter Create(Name, NULL));
	}

	return temporary ; 
}

Błąd:
Return value type does not match the function type

Inter oznacza typedef void* (*Inter)(const char *Name, int *ReturnCode);

EvilOne
  • Rejestracja:około 14 lat
  • Ostatnio:11 dni
  • Postów:78
0

wydaje mi się, że funkcja powinna wyglądać tak:

Kopiuj
unsigned long* Class::Function(Inter Create, char* Name)
{
    unsigned long* temporary = NULL;
    
    while(temporary == NULL)
    {
		temporary = reinterpret_cast<unsigned long*>(Create(Name, NULL));
    }

    return temporary;
}
edytowany 1x, ostatnio: EvilOne

Zarejestruj się i dołącz do największej społeczności programistów w Polsce.

Otrzymaj wsparcie, dziel się wiedzą i rozwijaj swoje umiejętności z najlepszymi.