Hi,
I am writing a program to solve a set of simultanious equations by Cramer's rule,using dynamic arrays but when I compile I get the following error:
invalid conversion from 'int' to 'int**' initializing argument 1 of ínt determ(int**,int)'.
I can find the error but my Dev C++ refuses to compile.
Here's the code, please have a look.
#include <iostream>
#include <cmath> // to include sqrt(), etc.
#include <cstdlib> // for atoi() and atof()
#include <unistd.h> // for getopt()
#include <time.h> // time_t, struct tm, difftime, time, mktime
#include <iostream> // for basic file IO operations
#include <fstream>
using namespace std;
typedef double real;
FILE *file;
int myPow(int x, int p);
int determ(int ** d,int n);
int main(int argc, char *argv[])
{
//read mat from file
int cols,rows;
int deta;
if((file=fopen("D:/1Equ/number.txt","r"))!=NULL)
{ fscanf(file,"%d", &rows);
fscanf(file,"%d", &cols);
int** a = new int*[rows];
for(int j=0;j<cols;++j)
a[j]=new int[cols];