C语言的函数.
发布网友
发布时间:2023-08-16 06:52
我来回答
共2个回答
热心网友
时间:2024-12-14 08:20
函数名: abort
功 能: 异常终止一个进程
用 法: void abort(void);
程序例:
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
printf("Calling abort()\n");
abort();
return 0; /* This is never reached */
}
参考资料:http://ke.baidu.com/view/531918.htm
热心网友
时间:2024-12-14 08:21
#include<process.h>或是#include<stdlib.h>
#include<stdio.h>
#include<process.h>
//using namespace std;
int main()
{
int i;
char ch;
for(i=0;i<100;i++)
{
if(i==50)
abort();
printf("%d\n",i);
}
ch=getchar();
return 0;
}
会出现如下错误信息:
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.