char tmp[MAX_PATH] = "C:/users/pictures/aa.jpg";
Bitmap  bb(L"C:/users/pictures/aa.jpg");     //这样定义程序是没有问题的
Bitmap(L"tmp");        //这样有错误为什么?

解决方案 »

  1.   

    最后一行写错了 是 Bitmap bb(L"tmp");
      

  2.   


    char tmp[MAX_PATH] = "C:/users/pictures/aa.jpg";
    Bitmap  bb(L"C:/users/pictures/aa.jpg");     //这样定义程序是没有问题的
    Bitmap  bb(L"tmp");        //这样有错误
      

  3.   

    Bitmap bb(L"tmp");
    这样构造是不是不可以的?
      

  4.   


    WCHAR tmp[]= "C:/users/pictures/aa.jpg";  // 不能是char,要求是Unicode
    Bitmap  bb(tmp);   // 不能再加引号了
      

  5.   

    少加个LWCHAR tmp[]= L"C:/users/pictures/aa.jpg";  // 不能是char,要求是Unicode
    Bitmap  bb(tmp);   // 不能再加引号了
      

  6.   

    加了引号 "tmp" 此时tmp就是字符了,低级错误,呵呵~~