中国开发网: 论坛: 程序员情感CBD: 贴子 333877
没脾气2x: C++Builder console 程序问题:
做了一个 console 程序如下:

int main(int argc, char* argv[])
{
while(true)
{
Sleep(50);
}
}

编译后运行。
运行过程中按 Ctrl+C 会报内存无法访问的错误:
ConsoleApp.exe - Application Error
The instruction at "0x40008f98" referenced memory at "0x00d448d8". The memory could not be "read"
Click on OK to terminate the program

后来发现把
Project->Options->Packages->Build with runtime packages 和
Project->Options->Linker->Use dynamic RTL
这两个选项任何一个去掉,再按 Ctrl+C 就没有错误了。

这是为啥呀。

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录