Originated from the problems I encountered two times:
For the first time, you need to add a code to the program that crashes the program, and I added an array of out-of-bounds code. Similar to
int a[3] = {0};
A[4] = 1;
On the Win32 platform, the program compiles and runs using the QT Creator development environment, and the programs are successfully hung up at runtime. Then consistent to the Linux platform, the use of g++ compiled to run, the program is running properly, completely did not hang off.
The second time, the code uses a vector, using subscript vector[i] to access a value, inadvertently causing I to 1. The same on the Linux platform, g++ compiled run, all normal, also got the correct running result. The same code hangs off on the Win32.
So it seems that the Linux platform or the g++ compiler has its own handling of subscript cross-border issues, causing the program to not hang. The Win32 platform or compiler on the platform does not process the subscript out of bounds, and the program hangs up.
Haven't verified exactly why this is causing the situation, want to see the article if you have an idea or know the reason can tell me ^ ^
Discussion on the cross-border problem of C + +