int n; cin >> n; for (int i = 0;i < n;i++) cin >> num[n];
同样的代码为什么在dev中可以运行,而在vs中无法运行
num在哪里定义的,是否有n或者更大的长度,是否越界。