怎样阻止VC控制台被关闭》?
就是不让关闭VC控制台‘
我开发平台是VS2010

解决方案 »

  1.   

    你可以while(true)
    {
    char c;
    cin>>c;
    过程
    }
      

  2.   

    和gui程序一样 拦截关闭消息
      

  3.   

    msdn上面有一些代码,不知道是否有用,基本上不用复杂的控制台程序了    while (1) 
        { 
     
            // Wait for the events. 
     
            if (! ReadConsoleInput( 
                    hStdin,      // input buffer handle 
                    irInBuf,     // buffer to read into 
                    128,         // size of read buffer 
                    &cNumRead) ) // number of records read 
                MyErrorExit("ReadConsoleInput"); 
      

  4.   

    http://topic.csdn.net/t/20040421/15/2992320.html
      

  5.   

    http://www.cnblogs.com/blueyund/articles/1270928.html
      

  6.   

    main函数最后加一句
    system("pause");
      

  7.   

    不是很明白lz的意思?你的VC和console有什么关系???
      

  8.   

    main的最后加上getchar();
    这样你需要按一下键才退出