@ sunnycoder
Thank you for the code.
I am also hoping for a C++ stuff with operator overloaded.
Main Topics
Browse All TopicsHi Experts
I would like to have source code to find Inverse of N X N matrix
either in C or in C++
Any algorithm can be used Crout's, Gaus' or finding co-factor
Regards
Shiju S N
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
>>>> I am also hoping for a C++ stuff with operator overloaded
Suppose, you think of overloading unary operator~.
Take the sample sunnycoder gave you a link to.
Make the three functions
double Determinant(double **a,int n)
void CoFactor(double **a,int n,double **b)
void Transpose(double **a,int n)
member functions of a class Matrix. 'a' and 'n' were data members of the class while 'b' needs to be passed as 'Matrx& b'. Determinant, CoFactor and Transpose have no arguments then. The rest of the implementation code should compile with minor changes (e. g. replace malloc/free by new/delete).
Then
Matrix& Matrix::operator~()
{
Matrix b = *this; // make a copy
CoFactor();
Transpose( );
(*this) /= b.Determinant();
return *this;
}
Beside of the three functions you would a copy constructor/assignment operator and a operator/= where the prototype is
Matrix& Matrix::operator/=(double d);
Regards, Alex
Business Accounts
Answer for Membership
by: sunnycoderPosted on 2006-11-06 at 02:55:47ID: 17880038
Hi shijusn, au/~pbourk e/other/in verse/
http://local.wasp.uwa.edu.
Cheers!
sunnycoder