Search:

Type: Posts; User: guitarman

Search: Search took 0.01 seconds.

  1. Thread: Free()

    by guitarman
    Replies
    4
    Views
    2,052

    Thanks for your help. I made some modifications...

    Thanks for your help. I made some modifications on function mult_matrix() and the problem seems to be solved :)


    float *mult_matrix(int n, float *p, float *q)
    {
    int i, j;
    float *x;

    ...
  2. Thread: Free()

    by guitarman
    Replies
    4
    Views
    2,052

    Free()

    When I compile this code on gcc using linux ubuntu 11.04


    #include <stdio.h>
    #include <stdlib.h>

    float *mult_matrix(int n, float *p, float *q);
    float *get_matrix(int m, int n);
    void...
  3. Replies
    12
    Views
    2,963

    But main() doesnt free it when it returns?

    But main() doesnt free it when it returns?
  4. Replies
    12
    Views
    2,963

    Thanks. It was a great help. Here's the new code:...

    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...
  5. Replies
    12
    Views
    2,963

    So, I've tried putting a, x and b on the stack in...

    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...
  6. Replies
    12
    Views
    2,963

    So you suggest to use the functions of dynamic...

    So you suggest to use the functions of dynamic allocation of memory on function main()? On this case, malloc() and then free()?
  7. Replies
    12
    Views
    2,963

    Pointers problem

    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,...
Results 1 to 7 of 7