I am writing a simple program to add two complex number using struct. All goes well except that when printing the values, I get an error that I am dereferencing an incomplete pointer.
Here is the code:
struct complexNumber * n1 = (struct complexNumber *) createNumber(10,10);
struct complexNumber * n2 = (struct complexNumber *) createNumber(03,12);
struct complexNumber * n3 = (struct complexNumber *) addComplexNunbers(n1,n2);
printf("Real Part: %d Imaginary Part: %d",n3->real,n3->imaginary);