But main() doesnt free it when it returns?
Type: Posts; User: guitarman
But main() doesnt free it when it returns?
Thanks. It was a great help. Here's the new code:
#include <stdio.h>
#include <stdlib.h>
float *mult_matrix(int n, float *p, float *q);
float *get_matrix(int m, int n);
void...
So, I've tried putting a, x and b on the stack in main() but I'm still having trouble. Please, what I'm doing wrong?
#include <stdio.h>
#include <stdlib.h>
float *mult_matrix(int n, float...
So you suggest to use the functions of dynamic allocation of memory on function main()? On this case, malloc() and then free()?
Hi there. I'm new to the forum and this is my first time posting here. I'm a newbie at C and I'm experiencing a pointers problem. Here's the code:
#include <stdio.h>
float *mult_matrix(int n,...