C语言怎么让他弹出一个提示对话框
C语言如何让他弹出一个提示对话框
我在VC6里面写的程序,不过想调试的话,设置断点调不了,但是我想在程序中执行到某个地方的时候弹出一个对话框来停止,请问怎么解决???
------解决方案--------------------
C语言弹出对话框不知道怎么实现!VC的话,#include <afxwin.h> 然后使用afxmessagebox就可以弹出对话框!
------解决方案--------------------
WINDOWS程序MessagBox
WINDOWS或控制台 assert
我在VC6里面写的程序,不过想调试的话,设置断点调不了,但是我想在程序中执行到某个地方的时候弹出一个对话框来停止,请问怎么解决???
------解决方案--------------------
C语言弹出对话框不知道怎么实现!VC的话,#include <afxwin.h> 然后使用afxmessagebox就可以弹出对话框!
------解决方案--------------------
WINDOWS程序MessagBox
WINDOWS或控制台 assert
- C/C++ code
// crt_assert.c // compile with: /c #include <stdio.h> #include <assert.h> #include <string.h> void analyze_string( char *string ); // Prototype int main( void ) { char test1[] = "abc", *test2 = NULL, test3[] = ""; printf ( "Analyzing string '%s'\n", test1 ); fflush( stdout ); analyze_string( test1 ); printf ( "Analyzing string '%s'\n", test2 ); fflush( stdout ); analyze_string( test2 ); printf ( "Analyzing string '%s'\n", test3 ); fflush( stdout ); analyze_string( test3 ); } // Tests a string to see if it is NULL, // empty, or longer than 0 characters. void analyze_string( char * string ) { assert( string != NULL ); // Cannot be NULL assert( *string != '\0' ); // Cannot be empty assert( strlen( string ) > 2 ); // Length must exceed 2 }