I have a C++ file which is like below:
int myNum[10] = {10, 20, 20, 40, 50, 60, 70, 80, 90, 100};
struct rfid
{
int AntennaID;
char *tid;
};
for (int i = 0; i < 10; i++) {
AntennaID = myNum[i];
struct rfid p1 = {AntennaID, tid};
cout << "roll no : " << p1.AntennaID << endl;
cout << "roll no : " << p1.tid << endl;
passInfo(*p1);
}
And I have a C file, which is like below:
#include <stdio.h>
void passInfo(*p1)
{
printf("%s :: \n", *p1);
}
How to pass the structure which is framed in C++ to a function of C?
void passInfo(*p1)does this even compile? you did not specify type of*p1.cppfile and a.hfile ? or.cppand.c? What compiler?