I have the following code:
typedef struct{
int A;
char* B;
}MYTYPE;
MYTYPE sample;
int nCount;
void doSomething(int A, MYTYPE* B)
{
//doing something inside this function.
}
doSomething(nCount, &sample);
Is there a way in my function doSomething() to check if the second argument passsed was exactly sample?
Yes:
note that your call is wrong, you need:
Since the function expects an address. It will not build, as written in the question.