Home > Back-end >  Devc debugging on the variable should be problem
Devc debugging on the variable should be problem

Time:12-06

First try too len tectonic structure, with a since the loop gain len himself will keep changing, or 1, put go up in turned 11, then 20... What's the problem, a great god answer

CodePudding user response:

Structure is defined as how you get out

CodePudding user response:

See your post twist of the neck ache, can directly send code? No screenshots

CodePudding user response:

reference 1/f, snow butterfly hit reply:
structure is defined as what you have to figure out

Large integer arithmetic code there
Struct bign {
Int d [1000], len;
Bign () {
Memset (d, 0, sizeof (d))
Len=0;
}
}

CodePudding user response:

reference weixin_44484668 reply: 3/f
Quote: refer to 1st floor snow butterfly hit reply:
structure is defined as what you have to figure out

Large integer arithmetic code there
Struct bign {
Int d [1000], len;
Bign () {
Memset (d, 0, sizeof (d))
Len=0;
}
}

And I found that if debug cycle on the variables in the body will appear this kind of situation, I don't know what reason

CodePudding user response:

Int main () {
Int a [10]={0}, k=0;
While (k<10) {
A [k++]=5;
}
for(int i=0; i<10; I++) {
Printf (" % d ", a [I]);
}
return 0;
}
Like this, I'd like to make a array is 5 to 10 elements, directly compiled output is correct, after debugging did wrong (debug k values are changing, for the first time 1 is up there? Should not be zero? Directly into 3 for the first time, but I didn't let circulation to proceed, simply want to see k value)

CodePudding user response:

reference 5 floor weixin_44484668 reply:
int main () {
Int a [10]={0}, k=0;
While (k<10) {
A [k++]=5;
}
for(int i=0; i<10; I++) {
Printf (" % d ", a [I]);
}
return 0;
}
Like this, I'd like to make a array is 5 to 10 elements, directly compiled output is correct, after debugging did wrong (debug k values are changing, for the first time 1 is up there? Should not be zero? Directly into 3 for the first time, but I didn't let circulation to proceed, simply want to see the value of k)

K is 0 for the first time, is actually a [k++]=5; Can be broken down as follows: a [k]=5; k++; Run run so decomposition,

CodePudding user response:

Then why do I put on k, k value will change over a period of time? I don't debugging results no problem, when debugging this result will be changed,

CodePudding user response:

reference 6 building self-confidence boy reply:
Quote: refer to the fifth floor weixin_44484668 reply:

Int main () {
Int a [10]={0}, k=0;
While (k<10) {
A [k++]=5;
}
for(int i=0; i<10; I++) {
Printf (" % d ", a [I]);
}
return 0;
}
Like this, I'd like to make a array is 5 to 10 elements, directly compiled output is correct, after debugging did wrong (debug k values are changing, for the first time 1 is up there? Should not be zero? Directly into 3 for the first time, but I didn't let circulation to proceed, simply want to see the value of k)

K is 0 for the first time, is actually a [k++]=5; Can be broken down as follows: a [k]=5; k++; Run run so decomposition,

If cannot view the value of k, because see a k is a change, the serious influence my final result

CodePudding user response:

reference 6 building self-confidence boy reply:
Quote: refer to the fifth floor weixin_44484668 reply:

Int main () {
Int a [10]={0}, k=0;
While (k<10) {
A [k++]=5;
}
for(int i=0; i<10; I++) {
Printf (" % d ", a [I]);
}
return 0;
}
Like this, I'd like to make a array is 5 to 10 elements, directly compiled output is correct, after debugging did wrong (debug k values are changing, for the first time 1 is up there? Should not be zero? Directly into 3 for the first time, but I didn't let circulation to proceed, simply want to see the value of k)

K is 0 for the first time, is actually a [k++]=5; Can be broken down as follows: a [k]=5; k++; Run run so decomposition,

This step you say I am understand, let a value [k] 5, then k++, debugging when I put on k, k will constantly change how to solve? If my final result is not correct, I want to see where I went wrong, on k, k is a number, again put k and change, such as I=0, k is 0 for the first time, I'm on k, k into 1, so I=0, became a [1]=5, it finally became a [10]=5

CodePudding user response:

http://blog.csdn.net/zhao4zhong1/article/details/53078924 old drivers find bug decade journey

CodePudding user response:

See from your statement should be the problem of your compiler over there! A compiler.

The validation code no problem as long as it is given to achieve the desired output specified input is ok,
See you the first picture is a big digits addition algorithm, add your this structure definition,
I seemed to be "programmer mathematical thinking" have seen the book,

CodePudding user response:

This software not, I do

CodePudding user response:

Used dev.
Want to say 1 v is the first compiler
  • Related