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...
Type: Posts; User: lijr07
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...
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...
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?
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?
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;
Thank you. But it does not work, since k is unknown before we input it.
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...
How to use gdb to set next to a valid location?
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...
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...
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>
...
These are a part of my program. Thank you.
[code]
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <math.h>
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...