没脾气2x:
C++Builder console 程序问题:
[阅读: 425] 2006-05-30 05:36:15
做了一个 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 就没有错误了。
这是为啥呀。
Notemper2x 3.1 ( ̄ε( ̄#)
没脾气2x 之 个人综合篇:
http://notemper2x.cndev.org/
我的 panoramio 相册:
http://panoramio.com/user/zhaixudong
我的 flickr相册:
http://www.flickr.com/photos/notemper2x/
QQ号20250出售,售价400,000元整(5位、皇冠80级、VIP7)