+ 1

I have an error with my function can someone give me some ideas i have tried different ideas but they didn't work.

https://code.sololearn.com/cP3E8Bm50qVP/?ref=app Thanks!

12th Feb 2021, 10:31 AM
Kane
Kane - avatar
4 Réponses
+ 2
int det(int* mat) { //base condition //recursive call } int main(){ //read matrix cout<<det(mat)<<endl; } implement this way
12th Feb 2021, 10:56 AM
NaSaPaKri
NaSaPaKri - avatar
+ 1
Okay thank you
12th Feb 2021, 10:57 AM
Kane
Kane - avatar
0
so u made a mistake in creating determinant function... proper way to define a function is to define outside main then call it wherever it can be accessible.
12th Feb 2021, 10:49 AM
NaSaPaKri
NaSaPaKri - avatar
0
NaSaPaKri How can i do that tho im a little confused
12th Feb 2021, 10:51 AM
Kane
Kane - avatar