what's wrong with this? I get this error: The error refers to the red line.
error: incompatible types in assignment
(in my header file)
Code:
#define MAX_TEST 80;
typedef struct {
char aString[MAX_TEXT-1];
int anInt;
double aDouble;
} Lab10Struct;
(in other file -- not the whole file, just the parts i have questions about)
Code:
Lab10Struct passByReference( Lab10Struct *variable )
{
strcat(variable->aString, "Hello again, do you like my hat?");
variable->anInt -= 123456789;
variable->aDouble -= 1.23456789;
return *variable;
}
int main()
{
Lab10Struct *ptr, s1;
ptr = passByReference(&s1);
if (ptr != &s1)
{
printf("Failed test #4\n");
pass = 0;
}
return 0;
}