Search:

Type: Posts; User: ali.franco95

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    890

    makefile question

    In a makefile what is the difference between the operators % and *

    %.c and *.c they both mean all files with .c extension
  2. Thread: thanks

    by ali.franco95
    Replies
    0
    Views
    697

    thanks

    Had started my project on 1st of Sep. Completed it today and it works. I wanted to thank all the people/helpers/tutors for their help. Internet, what an awesome thing, ay!
  3. Replies
    3
    Views
    1,832

    yes that work. thanks. I have a different problem...

    yes that work. thanks. I have a different problem now ( I have been working on the problem continuously so sorry, if it seems like I am asking too many questions).

    Previously I did as is shown in...
  4. Replies
    4
    Views
    954

    your opinion (not a help question)

    After dynamically allocating my arrays, I think I have seen some speed gains in my code down from 13sec to 11sec. Am I imagining this (could be that I am not listening to music as I am executing the...
  5. Replies
    3
    Views
    1,832

    dynamically allocating a 2d array

    Hi,

    what is the syntax for dynamically allocating a 2d array. My 2d array has large dimensions and so have to be dynamically allocated.



    // I want double array[5000][5000]

    // so I did...
  6. got your point

    got your point
  7. thank you. Nah I am not getting a...

    thank you.

    Nah I am not getting a segmentation fault. I am going to the debugger.
  8. I have encountered the problem first time, and...

    I have encountered the problem first time, and only today so I could not have posted it previously. Are you being sarcastic about the fact that I did not post my code? My code is several files and...
  9. function returns error when called more than once

    I have a function that solves a differential equation.

    Every thing works fine. I feed it an array of x-values and y-values and it solves the equations and puts the answer in the array of y-values....
  10. Replies
    5
    Views
    1,777

    I see. I thought about it. On the one hand given...

    I see. I thought about it. On the one hand given that most modern CPUs have GiB of memory (mine as 2 GiB), I thought 5MB should not be a big deal. I have not tried it with malloc but I will in...
  11. Replies
    5
    Views
    1,777

    when do we need to use malloc?

    Consider the following:


    struct half_Sol{ double a;
    int size;
    double *x;
    double y_one[13][2500];
    double...
  12. 2 dimensional array as a function parameter

    How does one pass a 2 dimensional array to a function and modify it in the function. I thought I knew this.

    For example a function that modifies a one dimensional array is declared as


    void...
  13. Replies
    5
    Views
    1,287

    Because in another part of the code when I...

    Because in another part of the code when I switched from exp to expl it got rid of some problems. I am guessing it is an over/underflow problem because for a sequence of numbers that get closer to...
  14. Replies
    5
    Views
    1,287

    Under/Overflow you do handle them

    I have a function that gives me log(y) and derivative of log(y) call it dlog(y) . However I am interested in knowing y and derivative of y call it dy. Now I get dy as follows


    dy = exp( log...
  15. Replies
    12
    Views
    3,142

    perhaps f is some macro. like this #define f...

    perhaps f is some macro. like this


    #define f 000345
    so that 100.f becomes 100.000345
  16. Replies
    13
    Views
    1,105

    thanks guys. I was confused because, I imagined...

    thanks guys. I was confused because, I imagined that extern replaces inclusion in aheader file. for example, If I don't include the array in the header file and just access it from an other file with...
  17. Replies
    13
    Views
    1,105

    I don't doubt that you are right. I am just...

    I don't doubt that you are right. I am just trying to figure out why it true. In the header file if I do this then I don't have the problem you are suggesting.


    #ifndef HEADER_H

    int...
  18. Replies
    13
    Views
    1,105

    Yes true. But if you did not use the keyword...

    Yes true. But if you did not use the keyword extern it would do exactly the same thing. At-least running it I get that impression.
  19. Replies
    13
    Views
    1,105

    why did you use the keyword extern in the...

    why did you use the keyword extern in the headerfile? You would not do it for a function.
  20. Replies
    13
    Views
    1,105

    What is your preffered choice

    To use a func_one from one file in another file you just include the func_one declaration in a header file and include this header file.

    Now if you want an array defined in one file to be...
  21. Replies
    2
    Views
    1,216

    pow and powl etc

    Is using the long double version of mathematical functions slower than using just the normal (double) versions? Just curious.
  22. Replies
    2
    Views
    730

    thanks buddy. Don't want n+1 size array. Just had...

    thanks buddy. Don't want n+1 size array. Just had to divide by n-1 to include the endpoint instead of n
  23. Replies
    2
    Views
    730

    Dope how do you do this

    Let x_ini be the initial value and x_fin be the final value in a sequence. If I want to create an array of n points The I just go



    x[i] = xini + (xfin - xini)*i/n


    this creates an array...
  24. Replies
    4
    Views
    879

    Ideas need for implementing

    Consider a set of x and y values. i.e


    #define SIZE 100
    double x[SIZE];
    double y[SIZE];

    Now I do the follow.
    1) allocate memory for an interpolation function call it f.
    2) implement code...
  25. Replies
    1
    Views
    1,108

    debugging with a makefile

    I have written a program that prints out all the permutations of the characters in a string literal. I have a segmentation fault and for the first time using a debugger (gdb). How do I include the -g...
Results 1 to 25 of 39
Page 1 of 2 1 2