我在VC6里面写的程序,不过想调试的话,设置断点调不了,但是我想在程序中执行到某个地方的时候弹出一个对话框来停止,请问怎么解决???

解决方案 »

  1.   

    C语言弹出对话框不知道怎么实现!VC的话,#include <afxwin.h> 然后使用afxmessagebox就可以弹出对话框!
      

  2.   

    WINDOWS程序MessagBoxWINDOWS或控制台 assert
    // crt_assert.c
    // compile with: /c
    #include <stdio.h>
    #include <assert.h>
    #include <string.h>void analyze_string( char *string );   // Prototypeint 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
    }
      

  3.   

    原来MessageBox()也可以是C语言,一直认为是C++的呢,,,学习了
      

  4.   

    #include <windows.h>MessageBox(NULL,_T("TEST"),_T("OK"),MB_OK);
    用API呗