Some help needed with class and this pointer
-
Hello , why i cant return the char* something using the class like that.
struct random_class {
char \*something; void \_\_thiscall classfunction (void \*pParam);
};
random_class* pParam;void (__thiscall* classfunction)(void *pParam );
void __thiscall myclassfunction(void *pParam )
{
classfunction(pParam->something);
}error C2227: left of '->crypto_buf' must point to class/struct/union/generic type 1> type is 'void *'
-
Hello , why i cant return the char* something using the class like that.
struct random_class {
char \*something; void \_\_thiscall classfunction (void \*pParam);
};
random_class* pParam;void (__thiscall* classfunction)(void *pParam );
void __thiscall myclassfunction(void *pParam )
{
classfunction(pParam->something);
}error C2227: left of '->crypto_buf' must point to class/struct/union/generic type 1> type is 'void *'
nah1337 wrote:
->crypto_buf'
are you sure you've posted the correct section of code ? I cant see :-
nah1337 wrote:
->crypto_buf'
anywhere in that snippet you've posted, so I dont know what relevance it has to your issue ... 'g'
-
nah1337 wrote:
->crypto_buf'
are you sure you've posted the correct section of code ? I cant see :-
nah1337 wrote:
->crypto_buf'
anywhere in that snippet you've posted, so I dont know what relevance it has to your issue ... 'g'
Yeah was mine mistake it should look like this:
struct random_class {
char \*crypto\_buf; void \_\_thiscall classfunction (void \*pParam);
};
random_class* pParam;void (__thiscall* classfunction)(void *pParam );
void __thiscall myclassfunction(void *pParam )
{
classfunction(pParam->crypto_buf);
}error C2227: left of '->crypto_buf' must point to class/struct/union/generic type 1> type is 'void *'
-
Yeah was mine mistake it should look like this:
struct random_class {
char \*crypto\_buf; void \_\_thiscall classfunction (void \*pParam);
};
random_class* pParam;void (__thiscall* classfunction)(void *pParam );
void __thiscall myclassfunction(void *pParam )
{
classfunction(pParam->crypto_buf);
}error C2227: left of '->crypto_buf' must point to class/struct/union/generic type 1> type is 'void *'