Hi, I've been trying to dynamically dimension a multidimensional array using C but I keep getting a compiler error. I've tried going through the help files example, but theres didn't work. Thanks for any help
PHP Code:
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>

int rows=3,columns=5;
void main(void)
{
  
float *matrix=NULL;
  
int i,j;
  
matrix = (float*)calloc(rowssizeof(float*));

  for (
i=0i<rows; ++i)
  {
    
matrix[i] =(float*)calloc(columns,sizeof(float*));
  }
  for (
i=0i<rowsi++)
  {
    for (
j=0j<columnsj++)
    {
      
//matrix[i][j] = i+j;
    
}
  }
  for (
i=0i<rows; ++i
  {
    
printf("\n\n");
    for (
j=0j<columns; ++j)
    {
      
printf("%5.2Lf"matrix[i]);
    }
  }
  for (
i=0i<rowsi++)
  {
    
//free(matrix[i]);
  
}
  
free(matrix);   
  
getch();