#include <assert.h>
void assert( int exp );
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <assert.h>
int main()
{
int fd;
fd = open ("test.txt", O_RDONLY);
assert (fd > 0);
printf ("test.txt can be open\n");
return (0);
}
./assert
assert: assert.c:13: main: Assertion `fd > 0' failed.
已放弃
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |