![但我没有改变 但我没有改变]()
- \ Jens Thoms Toerring ___ Je***********@physik.fu-berlin.de \ __________________________ http://www.toerring.deForm the look of it it seems as if array ''a'' is stored in memoryafter array ''x'', so when you write past the end of ''x'' you startto overwrite parts of ''a''. But don''t rely on that - it can be quitedifferent on a different machine or with a different compiler.Regards, Jens--\ Jens Thoms Toerring ___ Je***********@physik.fu-berlin.de\__________________________ http://www.toerring.de 仔细看看这一行。特别是结束条件。 Take a close look at this line. Particularly the ending condition. 您通过将6分配给x [5]和x [6]来创建未定义的行为。在您的计算机上,这些似乎恰好与[3]和[4],或[4]和[5]。 更有可能它们与[0]和[1]重合,是''a''的前两个元素。我不知道x [5]是如何与......同时的。 a [3] 除了在DS9000上! 或者可能有更复杂的解释。在理论中,通过访问x [5]或x [6],您正在授予程序允许将您的起居室涂成紫色的权利。 You are creating undefined behaviour by assigning 6 to x[5] and x[6]. On your computer, these seem to happen to coincide with a[3] and a[4], or a[4] and a[5].Much more likely they coincide with a[0] and a[1], the first twoelements of ''a''. I don''t see how x[5] could "coincide with" a[3]except on the DS9000! Or there might be a more complex explanation. In theory, by accessing x[5] or x[6], you are giving the program permission to paint your living room purple. 确实。 HTH, -ArthurIndeed.HTH,-Arthur 这篇关于变量发生了变化,但我没有改变。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-05 23:15