Tag: 名称冲突

奇怪的全局变量行为,一旦变量名称被更改,问题就会消失

在我的大学练习中,我遇到了变量的奇怪行为。 /* Main parameters */ double sizeX, sizeY; /* Size of the global domain */ int nPartX, nPartY; /* Particle number in x, y direction */ int nPart; /* Total number of particles */ int nCellX, nCellY; /* (Global) number of cells in x, y direction */ int steps; /* Number of timesteps */ double […]