I am implementing SVD and I found a code online which I am trying to use. I am getting the following error (Exception). Exception thrown at 0x003A3D43 in Project2.exe: 0xC0000005: Access violation writing location 0x00000000.
int main()
{
float **convA;
convA = new float*();
float *singular;
singular = new float();
float **Vt;
Vt = new float*();
for (int p=0; p < row; p++)
{
for (int m=0; m < col; m++)
{
convA[p][m] = (m + p)*2.5; //program breaks here
}
}
dsvd(convA, row, col, singular, Vt);
}
Function definition of dsvd is:
int dsvd(float **a, int m, int n, float *w, float **v);