Search:

Type: Posts; User: lijr07

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    2,670

    This is C code. I am sorry I made a mistake to...

    This is C code. I am sorry I made a mistake to put it here. But I think that C and C++ are similar. The sum of each set of numbers should be 4. But 0000, 0001, 0002, ... do not have this property. I...
  2. Replies
    13
    Views
    2,670

    I have an idea to solve this problem. But it is...

    I have an idea to solve this problem. But it is not successful. I use d[l] to record some value (the other values are obtained from d[l]). Could you help me?



    #include <stdio.h>


    #define...
  3. Replies
    13
    Views
    2,670

    Thank you very much. But the problem is not about...

    Thank you very much. But the problem is not about resize a vector. It is resize the number of loops. This is difficult. Do you have some method to solve this problems?
  4. Replies
    13
    Views
    2,670

    Thank you very much. But the problem is not about...

    Thank you very much. But the problem is not about resize a vector. It is resize the number of loops. This is difficult. Do you have some method to solve this problems?
  5. Replies
    13
    Views
    2,670

    Thank you very much. we have to write the code...

    Thank you very much.

    we have to write the code before we know exact value of k. If we know k=2 for example, it is easy to write the code as:




    int c[2]; //k=2
    int n;
  6. Replies
    13
    Views
    2,670

    Thank you. But it does not work, since k is...

    Thank you. But it does not work, since k is unknown before we input it.
  7. Replies
    13
    Views
    2,670

    how to solve this problem?

    If k is known before running the program, then it is easy to write codes to do the following (paragraph 2). But now k is input from keyboard. It is difficult to write codes. Are there some nice way...
  8. Replies
    11
    Views
    1,179

    How to use gdb to set next to a valid location?

    How to use gdb to set next to a valid location?
  9. Replies
    11
    Views
    1,179

    I have rewritten the code. Last time, the error...

    I have rewritten the code. Last time, the error is using NULL to point to some place. But this time it seems it is not this case. So I don't know how to fix it. The new codes are in the following. I...
  10. Replies
    11
    Views
    1,179

    How to solve this type of error?

    I wrote a program and have the following type of error. I don't know where is the problem and how to fix it. Thank you.

    Program received signal SIGSEGV, Segmentation fault.
    0x08048e1c in...
  11. Replies
    2
    Views
    1,199

    How to make the following program work?

    How to make the following program work? I think there are some place of the following program use the address NULL. But I don't know how to fix the problem. Thank you.




    #include <stdlib.h>
    ...
  12. Replies
    4
    Views
    1,568

    These are a part of my program. Thank you.

    These are a part of my program. Thank you.
  13. Replies
    4
    Views
    1,568

    The code is in the following. Thank you.

    [code]

    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <malloc.h>
    #include <math.h>
  14. Replies
    4
    Views
    1,568

    What's wrong with this program?

    The link of the program is: <<<snipped>>> I use gdb to debug the program. It said that: Program received signal SIGSEGV, Segmentation fault.
    0x080491c7 in simplify_polynomial (n=0x804c148) at...
Results 1 to 14 of 14