int v1 = 1234;
int func (int *p1)
{
constbool condi1 = *p1 > 0;
if (condi1)
{
// do something;
}
return 0 ;
}
void rmacro()
{
int *p1 = &v1;
func(p1);
}
int main()
{
}
Not sure what your original problem was, since I made so many changes.
Possibly it was at the line func(*p1);
Function func() expects a parameter of type int* (pointer to int) but it is being called with the argument *p which is of type int. Put simply, the function expected a pointer but it received an integer.