Hey guys, I have two strings in different structs that I need to compare.
typedef struct Ops
{
char oC[20];
char s1[15];
char s2[15];
char t[15];
struct Ops *next;
} op;
typedef struct v
{
char vRe[15];
int ls;
int f;
int m;
struct virtReg *next;
}vr;
.......
if(strcmp(vrCurr->vRe, opCurr->s1) == 0){
.........
or i tried using
if(strstr(vrCurr->vRe, opCurr->s1) == 0){
......
Whichever.. I just need to compare the two strings to see if they are equal. I keep getting an error saying incompatable types in assignment. and if i try if(strcmp(*vrCurr->vRe, *opCurr->s1) == 0).... I keep get an error that says that strcmp is making a pointer from an interger without a cast.
Start Free Trial