Matrices of complex numbers multiplication I'm trying to implement the multiplication of two matrices something like this picture in c langage. 
I want to read the numbers from a text file of x and store it later in an array the code that i tried is below
So the problem that I have is when i use the  static method Complex x[4] = { { 1,0 },{ 0,-1 },{ 1,1 },{ 4,-1 } }; it's work but when i want to read it from input.txt Complex x[4] it does not work what i missed.
typedef struct Complex
{
    double real;
    double image;
}Complex;

int main()
{
   Complex x[4] = { { 1,0 },{ 0,-1 },{ 1,1 },{ 4,-1 } };
   Complex y[4] = { { 0,1 },{ 1,-1 },{ 2,-3 },{ 4,0 } };
   FILE *input;
   input = fopen(&quot;input.txt&quot;, &quot;r&quot;);
   if (sensorInput == NULL ) {
        printf(stderr, &quot;Cannot open file\n&quot;);
        return 1;
    }
    else {
        for (i = 0; i&lt;4; ++i)
        {
                fscanf(sensorInput, &quot;%lf + j*%lf\t&quot;, &amp;x[i]); 
                printf(&quot;\n&quot;);
        }
    }

}

input.txt
1,0
0,-1
1,1
4,-1
The line
                fscanf(sensorInput, &quot;%lf + j*%lf\t&quot;, &amp;x[i]); 

should be
                fscanf(sensorInput, &quot;%lf,%lf\t&quot;, &amp;x[i].real, &amp;x[i].imag); 

Notice that C++ provides complex type, they support the common complex operations, and provide an io, and they can read complex numbers writen as (1,3) directly file_in &gt;&gt; x[i], once you have a istream
Note that this type of question you should ask in stackoverflow instead.