int zapCopr(int c[3][3], int a[3][3], int b[3], int o) { for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) c[i][j] = a[i][j]; } for (int i = 0; i < 3; ++i) c[i][o] = b[i]; int opr= c[0][0] * c[1][1] * c[2][2] + c[0][1] * c[1][2] * c[2][0] + c[1][0] * c[2][1] * c[0][2] - c[0][2] * c[1][1] * c[2][0] - c[2][1] * c[1][2] * c[0][0] - c[0][1] * c[1][0] * c[2][2]; return opr; } 

This feature should do business. I insert a function into the code. I put in arguments like arr[3][3] , but that's all. The compiler declares that this array has an index type, and I need a whole.

Closed due to the fact that off-topic participants Abyx , insolor , aleksandr barakin , zRrr , user194374 Mar 27 '16 at 6:12 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - insolor, aleksandr barakin, zRrr, community spirit
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • and I do not understand: what are you inserting and on which line is the error? - Grundy
  • Give at least a snippet of code as you do it. You yourself probably understand that the body of this function has nothing to do with it ... - Harry
  • @Harry No, I do not understand. It seemed to me that I wrote about everything. Here, I just assign a variable the value of this function. opr2 = zapCopr (c [3] [3], a [3] [3], b [3], 1); - PavelKas
  • one
    @PavelKas Well, that's all clear - do not write these [3] [3] and others like them! You already wrote them once - at the announcement. Now just call zapCopr(c,a,b,1) What you did was transfer the SPECIFIC element of the array, but it also does not exist :) - Harry
  • @Harry Thank you! I made such mistakes everywhere. And when I tried to call a function in Pascal, too. And now here! Well, I'm a fool. I will go to correct, and then enjoy the concise and flawlessly working code. :) - PavelKas

0