看着好乱啊。。new完后没delete,,,

解决方案 »

  1.   

    void main()
    {// create a bit map
    //CBitmap bitmap;
    // load bitmap
    //bitmap.LoadBitmapW(11111);
    CBitmap Bitmap;
    Bitmap.LoadBitmapW(11111);
    //bitmap.LoadBitmapW(11111);
    //加载位图,位图ID为IDB_BITMAP01,是已经导入Visual Studio的了
    //BITMAP bmp;
    //bitmap.GetBitmap(&bmp);
    //cout<<bmp.bmWidth<<endl;}
    为什么这样会提示
    File:f:\rtm\vctools\vs7libs\ship\atlmfc\include\afxwin1.inl
    Line:24
    For information on how your program can cause an assertion
    failure, seee the Visual C++ documentation on asserts.
    (Press Retry to debug the application)
      

  2.   

    偶遇到类似问题都是用
    “每次用/*...*/注释掉不同部分再重新编译,直到定位到具体语法出错的位置。”
    的方法解决的。VC编译选项加/EP /P,重新编译,查看宏展开后对应的.i文件。gcc加-E